mirror of https://github.com/actions/setup-node
apply review feedback
This commit is contained in:
parent
0d7418813c
commit
adeb189fd8
|
@ -71842,14 +71842,7 @@ function run() {
|
||||||
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
||||||
}
|
}
|
||||||
// Output version of node is being used
|
// Output version of node is being used
|
||||||
let installedVersion = '';
|
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
|
||||||
yield exec.exec('node', ['--version'], {
|
|
||||||
listeners: {
|
|
||||||
stdout: data => {
|
|
||||||
installedVersion += data.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
core.setOutput('node-version', installedVersion);
|
core.setOutput('node-version', installedVersion);
|
||||||
const registryUrl = core.getInput('registry-url');
|
const registryUrl = core.getInput('registry-url');
|
||||||
const alwaysAuth = core.getInput('always-auth');
|
const alwaysAuth = core.getInput('always-auth');
|
||||||
|
|
13
src/main.ts
13
src/main.ts
|
@ -41,14 +41,11 @@ export async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output version of node is being used
|
// Output version of node is being used
|
||||||
let installedVersion = '';
|
const {stdout: installedVersion} = await exec.getExecOutput(
|
||||||
await exec.exec('node', ['--version'], {
|
'node',
|
||||||
listeners: {
|
['--version'],
|
||||||
stdout: data => {
|
{ignoreReturnCode: true}
|
||||||
installedVersion += data.toString();
|
);
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
core.setOutput('node-version', installedVersion);
|
core.setOutput('node-version', installedVersion);
|
||||||
|
|
||||||
const registryUrl: string = core.getInput('registry-url');
|
const registryUrl: string = core.getInput('registry-url');
|
||||||
|
|
Loading…
Reference in New Issue