Skip to content

Commit 5940e66

Browse files
author
金双
committed
fix: make process.exit(0) Windows-only in TUI handler
The unconditional process.exit(0) at the end of the TUI handler causes the Linux CI test to fail. On non-Windows platforms, the index.ts finally{} safety-net handles process exit. Only Windows needs the explicit exit because the worker is not terminated there.
1 parent 2e7aafd commit 5940e66

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/thread.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ export const TuiThreadCommand = cmd({
242242
} finally {
243243
unguard?.()
244244
}
245-
process.exit(0)
245+
// On Windows we cannot await the worker shutdown or call
246+
// worker.terminate() — both destroy the console window. The worker
247+
// is still alive so the event loop won't drain; force-exit here.
248+
// On other platforms the index.ts finally{} safety-net handles exit.
249+
if (process.platform === "win32") process.exit(0)
246250
},
247251
})

0 commit comments

Comments
 (0)