From d4ef471744650e031fdc0b956e51e55f0f365203 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 27 Nov 2023 19:54:01 -0500 Subject: fix(node): `spawnSync`'s `status` was incorrect (#21359) The exit code wasn't hooked up properly. --- ext/node/polyfills/internal/child_process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/polyfills/internal') diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 1c9aced19..04773a8b7 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -855,7 +855,7 @@ export function spawnSync( windowsRawArguments: windowsVerbatimArguments, }).outputSync(); - const status = output.signal ? null : 0; + const status = output.signal ? null : output.code; let stdout = parseSpawnSyncOutputStreams(output, "stdout"); let stderr = parseSpawnSyncOutputStreams(output, "stderr"); -- cgit v1.2.3