fix: EINVAL when spawning cmd files on Windows (#41906)

fix: EINVAL when spawning on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2024-04-22 09:48:43 -04:00 committed by GitHub
parent 0a8ed258da
commit 703241e1e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 6 deletions

View file

@ -93,7 +93,8 @@ async function main () {
const { status: buildStatus } = cp.spawnSync(NPX_CMD, ['node-gyp', 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
env,
cwd: NAN_DIR,
stdio: 'inherit'
stdio: 'inherit',
shell: process.platform === 'win32'
});
if (buildStatus !== 0) {
@ -104,7 +105,8 @@ async function main () {
const { status: installStatus } = cp.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install'], {
env,
cwd: NAN_DIR,
stdio: 'inherit'
stdio: 'inherit',
shell: process.platform === 'win32'
});
if (installStatus !== 0) {
console.error('Failed to install nan node_modules');