Skip to content

Commit 1e163de

Browse files
committed
Quote exec parameters
1 parent ffde538 commit 1e163de

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15225,12 +15225,12 @@ function run() {
1522515225
}
1522615226
// Output version of node and npm that are being used
1522715227
const nodePath = yield io.which('node');
15228-
const nodeVersion = child_process_1.default.execSync(`${nodePath} --version`);
15228+
const nodeVersion = child_process_1.default.execSync(`"${nodePath}" --version`);
1522915229
console.log(`Node Version: ${nodeVersion}`);
1523015230
const npmPath = yield io.which('npm');
1523115231
// Older versions of Node don't include npm
1523215232
if (npmPath) {
15233-
const npmVersion = child_process_1.default.execSync(`${npmPath} --version`);
15233+
const npmVersion = child_process_1.default.execSync(`"${npmPath}" --version`);
1523415234
console.log(`npm Version: ${npmVersion}`);
1523515235
}
1523615236
const registryUrl = core.getInput('registry-url');

src/setup-node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ async function run() {
2121

2222
// Output version of node and npm that are being used
2323
const nodePath = await io.which('node');
24-
const nodeVersion = cp.execSync(`${nodePath} --version`);
24+
const nodeVersion = cp.execSync(`"${nodePath}" --version`);
2525
console.log(`Node Version: ${nodeVersion}`);
2626

2727
const npmPath = await io.which('npm');
2828
// Older versions of Node don't include npm
2929
if (npmPath) {
30-
const npmVersion = cp.execSync(`${npmPath} --version`);
30+
const npmVersion = cp.execSync(`"${npmPath}" --version`);
3131
console.log(`npm Version: ${npmVersion}`);
3232
}
3333

0 commit comments

Comments
 (0)