From a7285a43474335e8cfc38a2719b64959620638c9 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Fri, 10 Apr 2026 10:06:00 -0700 Subject: [PATCH] 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. --- src/commands/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/helpers.ts b/src/commands/helpers.ts index 19beb06..9af1561 100644 --- a/src/commands/helpers.ts +++ b/src/commands/helpers.ts @@ -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 {