chore(cli): resolve merge conflict with dev in bootstrap; keep try/finally with explicit return
parent
d554e7aaef
commit
7fd81dd93e
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue