Skip to content

Commit

Permalink
change to streams
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov committed Jul 12, 2022
1 parent aab7cc8 commit 48de4c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
11 changes: 10 additions & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
15 changes: 10 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 48de4c1

Please sign in to comment.