chore(cli): resolve merge conflict with dev in bootstrap; keep try/finally with explicit return
This commit is contained in:
parent
d554e7aaef
commit
7fd81dd93e
1 changed files with 3 additions and 3 deletions
|
|
@ -6,10 +6,10 @@ export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
|
||||||
directory,
|
directory,
|
||||||
init: InstanceBootstrap,
|
init: InstanceBootstrap,
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
// Ensure we always dispose instance state, even on errors,
|
// Guarantee teardown of process-scoped state even on errors
|
||||||
// so the CLI does not hang due to lingering watchers/subscriptions.
|
|
||||||
try {
|
try {
|
||||||
return await cb()
|
const result = await cb()
|
||||||
|
return result
|
||||||
} finally {
|
} finally {
|
||||||
await Instance.dispose()
|
await Instance.dispose()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue