mirror of
https://github.com/electron/electron.git
synced 2026-01-07 22:54:25 -05:00
fix: use correct signal variable in nan-spec-runner install check (#48639)
The install process spawn was not capturing its own signal variable, causing the error check to incorrectly reference the build signal instead. This could lead to: - Install termination by signal going undetected - False positive errors when build was killed but install succeeded This commit ensures the install signal is properly captured and checked, matching the pattern used for the build process.
This commit is contained in:
@@ -118,16 +118,16 @@ async function main () {
|
||||
return process.exit(buildStatus !== 0 ? buildStatus : signal);
|
||||
}
|
||||
|
||||
const { status: installStatus } = cp.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install'], {
|
||||
const { status: installStatus, signal: installSignal } = cp.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install'], {
|
||||
env,
|
||||
cwd: NAN_DIR,
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
|
||||
if (installStatus !== 0 || signal != null) {
|
||||
if (installStatus !== 0 || installSignal != null) {
|
||||
console.error('Failed to install nan node_modules');
|
||||
return process.exit(installStatus !== 0 ? installStatus : signal);
|
||||
return process.exit(installStatus !== 0 ? installStatus : installSignal);
|
||||
}
|
||||
|
||||
const onlyTests = args.only?.split(',');
|
||||
|
||||
Reference in New Issue
Block a user