mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 02:24:09 -07:00
Unused error variables in catch block are not allowed (#24487)
This commit is contained in:
@@ -354,7 +354,7 @@ export class IdeClient {
|
||||
if (parsedJson && parsedJson.content === null) {
|
||||
return undefined;
|
||||
}
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
logger.debug(
|
||||
`Invalid JSON in closeDiff response for ${filePath}:`,
|
||||
textPart.text,
|
||||
@@ -602,7 +602,7 @@ export class IdeClient {
|
||||
await this.discoverTools();
|
||||
this.setState(IDEConnectionStatus.Connected);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
if (transport) {
|
||||
try {
|
||||
await transport.close();
|
||||
@@ -636,7 +636,7 @@ export class IdeClient {
|
||||
await this.discoverTools();
|
||||
this.setState(IDEConnectionStatus.Connected);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
if (transport) {
|
||||
try {
|
||||
await transport.close();
|
||||
|
||||
@@ -125,7 +125,7 @@ export async function getConnectionConfigFromFile(
|
||||
const portFileContents = await fs.promises.readFile(portFile, 'utf8');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return JSON.parse(portFileContents);
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// For newer extension versions, the file name matches the pattern
|
||||
// /^gemini-ide-server-${pid}-\d+\.json$/. If multiple IDE
|
||||
// windows are open, multiple files matching the pattern are expected to
|
||||
|
||||
@@ -186,7 +186,7 @@ class VsCodeInstaller implements IdeInstaller {
|
||||
success: true,
|
||||
message: `${this.ideInfo.displayName} companion extension was installed successfully.`,
|
||||
};
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
return {
|
||||
success: false,
|
||||
message: `Failed to install ${this.ideInfo.displayName} companion extension. Please try installing '${GEMINI_CLI_COMPANION_EXTENSION_NAME}' manually from the ${this.ideInfo.displayName} extension marketplace.`,
|
||||
@@ -236,7 +236,7 @@ class PositronInstaller implements IdeInstaller {
|
||||
success: true,
|
||||
message: `${this.ideInfo.displayName} companion extension was installed successfully.`,
|
||||
};
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
return {
|
||||
success: false,
|
||||
message: `Failed to install ${this.ideInfo.displayName} companion extension. Please try installing '${GEMINI_CLI_COMPANION_EXTENSION_NAME}' manually from the ${this.ideInfo.displayName} extension marketplace.`,
|
||||
@@ -306,7 +306,7 @@ class AntigravityInstaller implements IdeInstaller {
|
||||
success: true,
|
||||
message: `${this.ideInfo.displayName} companion extension was installed successfully.`,
|
||||
};
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
return {
|
||||
success: false,
|
||||
message: `Failed to install ${this.ideInfo.displayName} companion extension. Please try installing '${GEMINI_CLI_COMPANION_EXTENSION_NAME}' manually from the ${this.ideInfo.displayName} extension marketplace.`,
|
||||
|
||||
@@ -49,7 +49,7 @@ async function getProcessTableWindows(): Promise<Map<number, ProcessInfo>> {
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
processes = JSON.parse(stdout);
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
return processMap;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ async function getProcessTableWindows(): Promise<Map<number, ProcessInfo>> {
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
// Fallback or error handling if PowerShell fails
|
||||
}
|
||||
return processMap;
|
||||
@@ -102,7 +102,7 @@ async function getProcessInfo(pid: number): Promise<{
|
||||
name: processName,
|
||||
command: fullCommand,
|
||||
};
|
||||
} catch (_e) {
|
||||
} catch {
|
||||
return { parentPid: 0, name: '', command: '' };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user