From 28505ad4d30321d06afa20151cade02534cdb9d5 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 21 Apr 2020 14:13:03 -0400 Subject: [PATCH] Move version to args --- dist/index.js | 4 ++-- src/setup-node.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 28a33e7..f14d470 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15220,9 +15220,9 @@ function run() { yield installer.getNode(version); } // Output version of node and npm that are being used - const nodeVersion = exec.exec(`"$ --version`); + exec.exec('node', ['--version']); // Older versions of Node don't include npm, so don't let this call fail - const npmVersion = exec.exec(`npm --version`, undefined, { + exec.exec('npm', ['--version'], { ignoreReturnCode: true }); const registryUrl = core.getInput('registry-url'); diff --git a/src/setup-node.ts b/src/setup-node.ts index 5fa89d7..1f19419 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -20,10 +20,10 @@ async function run() { } // Output version of node and npm that are being used - const nodeVersion = exec.exec(`"$ --version`); + exec.exec('node', ['--version']); // Older versions of Node don't include npm, so don't let this call fail - const npmVersion = exec.exec(`npm --version`, undefined, { + exec.exec('npm', ['--version'], { ignoreReturnCode: true });