Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Jef LeCompte 2022-07-27 14:15:58 -07:00
commit 5a01179c35
No known key found for this signature in database
GPG key ID: 7F5BA322B5DC170C
12 changed files with 137 additions and 42 deletions

View file

@ -1,4 +1,5 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as installer from './installer';
import fs from 'fs';
import * as auth from './authutil';
@ -39,6 +40,18 @@ export async function run() {
await installer.getNode(version, stable, checkLatest, auth, arch);
}
// Output version of node is being used
try {
const {stdout: installedVersion} = await exec.getExecOutput(
'node',
['--version'],
{ignoreReturnCode: true, silent: true}
);
core.setOutput('node-version', installedVersion.trim());
} catch (err) {
core.setOutput('node-version', '');
}
const registryUrl: string = core.getInput('registry-url');
const alwaysAuth: string = core.getInput('always-auth');
if (registryUrl) {