3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-22 10:09:33 +01:00

Await exec calls to ensure proper version ordering

This commit is contained in:
Josh Gross 2020-04-21 14:17:29 -04:00
parent 28505ad4d3
commit 46903d1fb1
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

@ -15220,9 +15220,9 @@ function run() {
yield installer.getNode(version); yield installer.getNode(version);
} }
// Output version of node and npm that are being used // Output version of node and npm that are being used
exec.exec('node', ['--version']); yield exec.exec('node', ['--version']);
// Older versions of Node don't include npm, so don't let this call fail // Older versions of Node don't include npm, so don't let this call fail
exec.exec('npm', ['--version'], { yield exec.exec('npm', ['--version'], {
ignoreReturnCode: true ignoreReturnCode: true
}); });
const registryUrl = core.getInput('registry-url'); const registryUrl = core.getInput('registry-url');

View file

@ -20,10 +20,10 @@ async function run() {
} }
// Output version of node and npm that are being used // Output version of node and npm that are being used
exec.exec('node', ['--version']); await exec.exec('node', ['--version']);
// Older versions of Node don't include npm, so don't let this call fail // Older versions of Node don't include npm, so don't let this call fail
exec.exec('npm', ['--version'], { await exec.exec('npm', ['--version'], {
ignoreReturnCode: true ignoreReturnCode: true
}); });