mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-25 17:15:04 +02:00
fix: catch corrupt JSON in Gemini CLI status command
readGeminiSettings() throws on corrupt JSON since ae6915b, but
checkGeminiCliHooksStatus() called it without catching — violating
its "returns 0 always" contract.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -418,7 +418,13 @@ export function checkGeminiCliHooksStatus(): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const settings = readGeminiSettings();
|
||||
let settings: GeminiSettingsJson;
|
||||
try {
|
||||
settings = readGeminiSettings();
|
||||
} catch (error) {
|
||||
console.log(`Gemini CLI settings: ${(error as Error).message}\n`);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!settings.hooks) {
|
||||
console.log('Gemini CLI settings: Found, but no hooks configured\n');
|
||||
|
||||
Reference in New Issue
Block a user