Add comment explaining why clearActivity is called before process.exit
process.exit(1) skips the finally block, so cleanup must happen explicitly in the catch block.
This commit is contained in:
parent
101651b107
commit
a7285a4347
|
|
@ -188,7 +188,7 @@ export async function mergeAndClose(branch: string, opts?: { squash?: boolean; f
|
|||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err)
|
||||
spin.fail(message)
|
||||
if (session) await vm.clearActivity(session.worktree, branch)
|
||||
if (session) await vm.clearActivity(session.worktree, branch) // process.exit below skips finally
|
||||
await git.abortMerge(root)
|
||||
process.exit(1)
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user