Unused error variables in catch block are not allowed (#24487)

This commit is contained in:
Alisa
2026-04-01 21:33:07 -07:00
committed by GitHub
parent 84936dc85d
commit 3344f6849c
92 changed files with 162 additions and 157 deletions
@@ -31,7 +31,7 @@ export function useGitBranchName(cwd: string): string | undefined {
);
setBranchName(hashStdout.toString().trim());
}
} catch (_error) {
} catch {
setBranchName(undefined);
}
}, [cwd, setBranchName]);
@@ -57,7 +57,7 @@ export function useGitBranchName(cwd: string): string | undefined {
fetchBranchName();
}
});
} catch (_watchError) {
} catch {
// Silently ignore watcher errors (e.g. permissions or file not existing),
// similar to how exec errors are handled.
// The branch name will simply not update automatically.