diff options
| author | Dax Raad <[email protected]> | 2026-02-18 20:36:57 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-02-18 20:43:50 -0500 |
| commit | 11a37834c2afd5a1ba88f8417701472234caaa3a (patch) | |
| tree | 5b85b8793daf46f8b418e4b038e316a2add61e2f | |
| parent | d620455531443340d2719510d37e80af433cef7e (diff) | |
| download | opencode-11a37834c2afd5a1ba88f8417701472234caaa3a.tar.gz opencode-11a37834c2afd5a1ba88f8417701472234caaa3a.zip | |
tui: ensure onExit callback fires after terminal output is written
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/context/exit.tsx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/context/exit.tsx b/packages/opencode/src/cli/cmd/tui/context/exit.tsx index 3eb2edf72..a6f775913 100644 --- a/packages/opencode/src/cli/cmd/tui/context/exit.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/exit.tsx @@ -34,7 +34,6 @@ export const { use: useExit, provider: ExitProvider } = createSimpleContext({ renderer.setTerminalTitle("") renderer.destroy() win32FlushInputBuffer() - await input.onExit?.() if (reason) { const formatted = FormatError(reason) ?? FormatUnknownError(reason) if (formatted) { @@ -43,7 +42,7 @@ export const { use: useExit, provider: ExitProvider } = createSimpleContext({ } const text = store.get() if (text) process.stdout.write(text + "\n") - process.exit(0) + await input.onExit?.() }, { message: store, |
