fix: preserve child process signal exit codes (#113685)

Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
This commit is contained in:
Peter Steinberger
2026-07-25 06:51:49 -07:00
committed by GitHub
parent 687923189e
commit 89984a5082
5 changed files with 60 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import {
getDebugProxyCaptureStore,
} from "../proxy-capture/store.sqlite.js";
import type { CaptureQueryPreset } from "../proxy-capture/types.js";
import { resolveSubprocessExitCode } from "./subprocess-exit-code.js";
export async function runDebugProxyStartCommand(opts: { host?: string; port?: number }) {
const settings = resolveDebugProxySettings();
@@ -108,7 +109,7 @@ export async function runDebugProxyRunCommand(opts: {
});
child.once("error", reject);
child.once("exit", (code, signal) => {
process.exitCode = signal ? 1 : (code ?? 1);
process.exitCode = resolveSubprocessExitCode(code, signal);
resolve();
});
});