From 7fd81dd93e4a4e2e5c81fd74fd8c9a0477abe488 Mon Sep 17 00:00:00 2001 From: Ian Maurer Date: Tue, 11 Nov 2025 17:16:47 -0500 Subject: [PATCH] chore(cli): resolve merge conflict with dev in bootstrap; keep try/finally with explicit return --- packages/opencode/src/cli/bootstrap.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/cli/bootstrap.ts b/packages/opencode/src/cli/bootstrap.ts index d5b646dd5c..7f5c9b7bf4 100644 --- a/packages/opencode/src/cli/bootstrap.ts +++ b/packages/opencode/src/cli/bootstrap.ts @@ -6,10 +6,10 @@ export async function bootstrap(directory: string, cb: () => Promise) { directory, init: InstanceBootstrap, fn: async () => { - // Ensure we always dispose instance state, even on errors, - // so the CLI does not hang due to lingering watchers/subscriptions. + // Guarantee teardown of process-scoped state even on errors try { - return await cb() + const result = await cb() + return result } finally { await Instance.dispose() }