fix(gsd): add logWarning to empty catch block in orphaned worktree cleanup

The workflow-logger coverage test (#3348) requires all catch blocks in
migrated files to include logging. Add logWarning for the expected
failure case when nativeWorktreeRemove fails on orphaned directories.

Refs #3739
This commit is contained in:
Jeremy 2026-04-07 21:41:08 -05:00
parent fe8d67579e
commit b7d7c69b9e

View file

@ -208,8 +208,9 @@ export function auditOrphanedMilestoneBranches(
// Try git worktree remove first (handles registered worktrees)
try {
nativeWorktreeRemove(basePath, wtDir, true);
} catch {
} catch (e) {
// Not a registered worktree — expected for orphaned dirs
logWarning("engine", `worktree remove failed (expected for orphaned dirs): ${e instanceof Error ? e.message : String(e)}`);
}
// If the directory still exists after git worktree remove (either it