From 46903d1fb12ef202fe9110cee5fdb79310e215de Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 21 Apr 2020 14:17:29 -0400 Subject: [PATCH] Await exec calls to ensure proper version ordering --- 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 f14d4707..b22d2b9f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15220,9 +15220,9 @@ function run() { yield installer.getNode(version); } // 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 - exec.exec('npm', ['--version'], { + yield exec.exec('npm', ['--version'], { ignoreReturnCode: true }); const registryUrl = core.getInput('registry-url'); diff --git a/src/setup-node.ts b/src/setup-node.ts index 1f194191..f3b09c56 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -20,10 +20,10 @@ async function run() { } // 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 - exec.exec('npm', ['--version'], { + await exec.exec('npm', ['--version'], { ignoreReturnCode: true });