diff --git a/src/commands/test.ts b/src/commands/test.ts index 8bf5ce5..fcb1ca9 100644 --- a/src/commands/test.ts +++ b/src/commands/test.ts @@ -4985,7 +4985,10 @@ async function runBatchRun( return { ...r, dashboardUrl: state.dashboardUrl }; }) : batchRunResults; - out.print({ results: enrichedResults }); + out.print({ + results: enrichedResults, + creation: { results: createResponse.results, summary: createResponse.summary }, + }); } else if (!opts.wait) { // Text mode, no --wait: statuses are non-terminal by design ('queued'), // so a pass/fail summary would misread a successful dispatch as diff --git a/src/lib/interrupt.ts b/src/lib/interrupt.ts index 939a2fd..f291d32 100644 --- a/src/lib/interrupt.ts +++ b/src/lib/interrupt.ts @@ -165,7 +165,7 @@ export class ShutdownController { } class BrokenPipeInterruptError extends InterruptError { - override readonly exitCode = 0; + override readonly exitCode = (process.exitCode as number | undefined) ?? 0; constructor() { // Existing graceful-detach consumers read `.signal` to render their @@ -366,7 +366,7 @@ export function installBrokenPipeGuard(deps: BrokenPipeDeps = {}): void { shutdown.brokenPipe(); return; } - exit(0); + exit((process.exitCode as number | undefined) ?? 0); return; } throw error;