mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-17 08:41:19 -07:00
Unused error variables in catch block are not allowed (#24487)
This commit is contained in:
@@ -319,7 +319,7 @@ export function useAtCompletion(props: UseAtCompletionProps): void {
|
||||
if (state.pattern !== null) {
|
||||
dispatch({ type: 'SEARCH', payload: state.pattern });
|
||||
}
|
||||
} catch (_) {
|
||||
} catch {
|
||||
if (initEpoch.current === currentEpoch) {
|
||||
dispatch({ type: 'ERROR' });
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('useConsoleMessages', () => {
|
||||
for (const unmount of unmounts) {
|
||||
try {
|
||||
unmount();
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
// Ignore unmount errors
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ describe('useErrorCount', () => {
|
||||
for (const unmount of unmounts) {
|
||||
try {
|
||||
unmount();
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
// Ignore unmount errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export const useFolderTrust = (
|
||||
|
||||
try {
|
||||
await trustedFolders.setValue(cwd, trustLevel);
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
coreEvents.emitFeedback(
|
||||
'error',
|
||||
'Failed to save trust settings. Exiting Gemini CLI.',
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -141,7 +141,7 @@ export const usePermissionsModifyTrust = (
|
||||
const folders = loadTrustedFolders();
|
||||
try {
|
||||
await folders.setValue(cwd, trustLevel);
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
coreEvents.emitFeedback(
|
||||
'error',
|
||||
'Failed to save trust settings. Your changes may not persist.',
|
||||
@@ -159,7 +159,7 @@ export const usePermissionsModifyTrust = (
|
||||
try {
|
||||
await folders.setValue(cwd, pendingTrustLevel);
|
||||
return true;
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
coreEvents.emitFeedback(
|
||||
'error',
|
||||
'Failed to save trust settings. Your changes may not persist.',
|
||||
|
||||
Reference in New Issue
Block a user