From 475bf6cd84ad41314067bda6a93c6095f8095802 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 10 Apr 2026 06:44:18 -0500 Subject: [PATCH] fix(gsd): replace empty catch block with descriptive comment CI lint rule forbids empty catch blocks in migrated files. --- src/resources/extensions/gsd/auto-worktree.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/auto-worktree.ts b/src/resources/extensions/gsd/auto-worktree.ts index d33faee54..c4aefe621 100644 --- a/src/resources/extensions/gsd/auto-worktree.ts +++ b/src/resources/extensions/gsd/auto-worktree.ts @@ -2011,7 +2011,11 @@ export function mergeMilestoneToMain( // capture unrelated files from other milestones. if (existsSync(worktreeCwd)) { let preTeardownBranch: string | null = null; - try { preTeardownBranch = nativeGetCurrentBranch(worktreeCwd); } catch { /* */ } + try { + preTeardownBranch = nativeGetCurrentBranch(worktreeCwd); + } catch { + // Branch detection failure is non-fatal — skip the auto-commit to be safe + } const isOnMilestoneBranch = preTeardownBranch === milestoneBranch; if (isOnMilestoneBranch) {