mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
CI: improve cross-platform (i.e. Windows) process spawning
This commit is contained in:
parent
0c4a45b1f4
commit
b711661784
@ -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' }
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user