chore(cli): resolve merge conflict with dev in bootstrap; keep try/finally with explicit return

fix/cli-clean-exit-on-model-errors
Ian Maurer 2025-11-11 17:16:47 -05:00
parent d554e7aaef
commit 7fd81dd93e
1 changed files with 3 additions and 3 deletions

View File

@ -6,10 +6,10 @@ export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
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()
}