3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-25 11:39:32 +01:00

Quote exec parameters

This commit is contained in:
Josh Gross 2020-04-21 11:40:45 -04:00
parent ffde538781
commit 1e163ded31
No known key found for this signature in database
GPG key ID: 17A6308EA2144978
2 changed files with 4 additions and 4 deletions

4
dist/index.js vendored
View file

@ -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');

View file

@ -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}`);
}