CI: improve cross-platform (i.e. Windows) process spawning

This commit is contained in:
Lovell Fuller 2020-08-18 17:11:42 +01:00
parent 0c4a45b1f4
commit b711661784

View File

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