Update dist

This commit is contained in:
Uladzimir Havenchyk 2022-07-31 17:40:03 +03:00
parent 8ba370a949
commit 6ba41b7436
No known key found for this signature in database
GPG Key ID: CAE771D3036BED13
2 changed files with 23 additions and 13 deletions

29
dist/setup/index.js vendored
View File

@ -71855,14 +71855,7 @@ function run() {
const checkLatest = (core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
yield installer.getNode(version, stable, checkLatest, auth, arch);
}
// Output version of node is being used
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', '');
}
yield printEnvDetailsAndSetOutput();
const registryUrl = core.getInput('registry-url');
const alwaysAuth = core.getInput('always-auth');
if (registryUrl) {
@ -71902,6 +71895,26 @@ function resolveVersionInput() {
}
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();
});
}
/***/ }),

View File

@ -6,7 +6,6 @@ import * as auth from './authutil';
import * as path from 'path';
import {restoreCache} from './cache-restore';
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
import { URL } from 'url';
import os = require('os');
export async function run() {
@ -101,9 +100,7 @@ function resolveVersionInput(): string {
}
async function printEnvDetailsAndSetOutput() {
const groupName = "Environment details";
core.startGroup(groupName);
core.startGroup("Environment details");
// Output version of node is being used
try {
const {stdout: installedNodeVersion} = await exec.getExecOutput(
@ -124,5 +121,5 @@ async function printEnvDetailsAndSetOutput() {
ignoreReturnCode: true
});
core.endGroup(groupName);
core.endGroup();
}