Skip to content

Commit 28505ad

Browse files
committed
Move version to args
1 parent 2d53d29 commit 28505ad

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
@@ -15220,9 +15220,9 @@ function run() {
1522015220
yield installer.getNode(version);
1522115221
}
1522215222
// Output version of node and npm that are being used
15223-
const nodeVersion = exec.exec(`"$ --version`);
15223+
exec.exec('node', ['--version']);
1522415224
// Older versions of Node don't include npm, so don't let this call fail
15225-
const npmVersion = exec.exec(`npm --version`, undefined, {
15225+
exec.exec('npm', ['--version'], {
1522615226
ignoreReturnCode: true
1522715227
});
1522815228
const registryUrl = core.getInput('registry-url');

src/setup-node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ async function run() {
2020
}
2121

2222
// Output version of node and npm that are being used
23-
const nodeVersion = exec.exec(`"$ --version`);
23+
exec.exec('node', ['--version']);
2424

2525
// Older versions of Node don't include npm, so don't let this call fail
26-
const npmVersion = exec.exec(`npm --version`, undefined, {
26+
exec.exec('npm', ['--version'], {
2727
ignoreReturnCode: true
2828
});
2929

0 commit comments

Comments
 (0)