mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-14 03:50:49 -07:00
Disallow and suppress unsafe assignment (#19736)
This commit is contained in:
committed by
GitHub
parent
3e786a161e
commit
981e9a978e
@@ -127,6 +127,7 @@ async function getGeminiMdFilePathsInternal(
|
||||
result.value.global.forEach((p) => globalPaths.add(p));
|
||||
result.value.project.forEach((p) => projectPaths.add(p));
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const error = result.reason;
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
logger.error(`Error discovering files in directory: ${message}`);
|
||||
@@ -299,6 +300,7 @@ export async function readGeminiMdFiles(
|
||||
} else {
|
||||
// This case shouldn't happen since we catch all errors above,
|
||||
// but handle it for completeness
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const error = result.reason;
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
logger.error(`Unexpected error processing file: ${message}`);
|
||||
|
||||
Reference in New Issue
Block a user