From b7116617841a80a7959b7b0bda84776bc3cb0638 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 18 Aug 2020 17:11:42 +0100 Subject: [PATCH] CI: improve cross-platform (i.e. Windows) process spawning --- install/prebuild-ci.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/prebuild-ci.js b/install/prebuild-ci.js index a09356b8..c756f001 100644 --- a/install/prebuild-ci.js +++ b/install/prebuild-ci.js @@ -1,9 +1,12 @@ 'use strict'; -const { execFileSync } = require('child_process'); +const { spawnSync } = require('child_process'); const { prebuild_upload: hasToken, APPVEYOR_REPO_TAG, TRAVIS_TAG } = process.env; if (hasToken && (Boolean(APPVEYOR_REPO_TAG) || TRAVIS_TAG)) { - execFileSync('prebuild', ['--runtime', 'napi', '--target', '3'], { stdio: 'inherit' }); + spawnSync( + 'node ./node_modules/.bin/prebuild --runtime napi --target 3', + { shell: true, stdio: 'inherit' } + ); }