mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
Update dist
This commit is contained in:
parent
8ba370a949
commit
6ba41b7436
2 changed files with 23 additions and 13 deletions
29
dist/setup/index.js
vendored
29
dist/setup/index.js
vendored
|
@ -71855,14 +71855,7 @@ function run() {
|
||||||
const checkLatest = (core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
|
const checkLatest = (core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
|
||||||
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
||||||
}
|
}
|
||||||
// Output version of node is being used
|
yield printEnvDetailsAndSetOutput();
|
||||||
try {
|
|
||||||
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true, silent: true });
|
|
||||||
core.setOutput('node-version', installedVersion.trim());
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
core.setOutput('node-version', '');
|
|
||||||
}
|
|
||||||
const registryUrl = core.getInput('registry-url');
|
const registryUrl = core.getInput('registry-url');
|
||||||
const alwaysAuth = core.getInput('always-auth');
|
const alwaysAuth = core.getInput('always-auth');
|
||||||
if (registryUrl) {
|
if (registryUrl) {
|
||||||
|
@ -71902,6 +71895,26 @@ function resolveVersionInput() {
|
||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
function printEnvDetailsAndSetOutput() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
core.startGroup("Environment details");
|
||||||
|
// Output version of node is being used
|
||||||
|
try {
|
||||||
|
const { stdout: installedNodeVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
|
||||||
|
core.setOutput('node-version', installedNodeVersion.trim());
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
core.setOutput('node-version', '');
|
||||||
|
}
|
||||||
|
yield exec.getExecOutput('npm', ['--version'], {
|
||||||
|
ignoreReturnCode: true
|
||||||
|
});
|
||||||
|
yield exec.getExecOutput('yarn', ['--version'], {
|
||||||
|
ignoreReturnCode: true
|
||||||
|
});
|
||||||
|
core.endGroup();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
|
@ -6,7 +6,6 @@ import * as auth from './authutil';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import {restoreCache} from './cache-restore';
|
import {restoreCache} from './cache-restore';
|
||||||
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
|
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
|
||||||
import { URL } from 'url';
|
|
||||||
import os = require('os');
|
import os = require('os');
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
|
@ -101,9 +100,7 @@ function resolveVersionInput(): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function printEnvDetailsAndSetOutput() {
|
async function printEnvDetailsAndSetOutput() {
|
||||||
const groupName = "Environment details";
|
core.startGroup("Environment details");
|
||||||
|
|
||||||
core.startGroup(groupName);
|
|
||||||
// Output version of node is being used
|
// Output version of node is being used
|
||||||
try {
|
try {
|
||||||
const {stdout: installedNodeVersion} = await exec.getExecOutput(
|
const {stdout: installedNodeVersion} = await exec.getExecOutput(
|
||||||
|
@ -124,5 +121,5 @@ async function printEnvDetailsAndSetOutput() {
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
});
|
});
|
||||||
|
|
||||||
core.endGroup(groupName);
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue