From 48de4c13f6f686eebe0d350838793fffd4421b26 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 12 Jul 2022 10:36:10 +0200 Subject: [PATCH] change to streams --- dist/setup/index.js | 11 ++++++++++- src/main.ts | 15 ++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 679421ccd..31aa5cc81 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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'); diff --git a/src/main.ts b/src/main.ts index c17e8ae4d..88f99e016 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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');