From 1e163ded3119750eca6967d816eebbb99fe0b197 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 21 Apr 2020 11:40:45 -0400 Subject: [PATCH] Quote exec parameters --- 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 394eb35..4e80301 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15225,12 +15225,12 @@ function run() { } // Output version of node and npm that are being used const nodePath = yield io.which('node'); - const nodeVersion = child_process_1.default.execSync(`${nodePath} --version`); + const nodeVersion = child_process_1.default.execSync(`"${nodePath}" --version`); console.log(`Node Version: ${nodeVersion}`); const npmPath = yield io.which('npm'); // Older versions of Node don't include npm if (npmPath) { - const npmVersion = child_process_1.default.execSync(`${npmPath} --version`); + const npmVersion = child_process_1.default.execSync(`"${npmPath}" --version`); console.log(`npm Version: ${npmVersion}`); } const registryUrl = core.getInput('registry-url'); diff --git a/src/setup-node.ts b/src/setup-node.ts index b954493..4573cf2 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -21,13 +21,13 @@ async function run() { // Output version of node and npm that are being used const nodePath = await io.which('node'); - const nodeVersion = cp.execSync(`${nodePath} --version`); + const nodeVersion = cp.execSync(`"${nodePath}" --version`); console.log(`Node Version: ${nodeVersion}`); const npmPath = await io.which('npm'); // Older versions of Node don't include npm if (npmPath) { - const npmVersion = cp.execSync(`${npmPath} --version`); + const npmVersion = cp.execSync(`"${npmPath}" --version`); console.log(`npm Version: ${npmVersion}`); }