3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-22 10:09:33 +01:00

change to streams

This commit is contained in:
Dmitry Shibanov 2022-07-12 10:36:10 +02:00
parent aab7cc882a
commit 48de4c13f6
2 changed files with 20 additions and 6 deletions

11
dist/setup/index.js vendored
View file

@ -71846,7 +71846,16 @@ function run() {
yield installer.getNode(version, stable, checkLatest, auth, arch);
}
// Output version of node is being used
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true, silent: false });
let installedVersion = '';
const result = yield exec.exec('node', ['--version'], {
ignoreReturnCode: true,
silent: false,
listeners: {
stdout: data => {
installedVersion = data.toString();
}
}
});
core.setOutput('node-version', installedVersion);
const registryUrl = core.getInput('registry-url');
const alwaysAuth = core.getInput('always-auth');

View file

@ -41,11 +41,16 @@ export async function run() {
}
// Output version of node is being used
const {stdout: installedVersion} = await exec.getExecOutput(
'node',
['--version'],
{ignoreReturnCode: true, silent: false}
);
let installedVersion = '';
const result = await exec.exec('node', ['--version'], {
ignoreReturnCode: true,
silent: false,
listeners: {
stdout: data => {
installedVersion = data.toString();
}
}
});
core.setOutput('node-version', installedVersion);
const registryUrl: string = core.getInput('registry-url');