mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-12 22:31:12 -07:00
fix(core): silently handle EPERM when listing dir structure (#25066)
This commit is contained in:
committed by
GitHub
parent
de628b04fc
commit
55db77bb91
@@ -113,7 +113,9 @@ async function readFullStructure(
|
||||
} catch (error: unknown) {
|
||||
if (
|
||||
isNodeError(error) &&
|
||||
(error.code === 'EACCES' || error.code === 'ENOENT')
|
||||
(error.code === 'EACCES' ||
|
||||
error.code === 'ENOENT' ||
|
||||
error.code === 'EPERM')
|
||||
) {
|
||||
debugLogger.warn(
|
||||
`Warning: Could not read directory ${currentPath}: ${error.message}`,
|
||||
@@ -121,7 +123,7 @@ async function readFullStructure(
|
||||
if (currentPath === rootPath && error.code === 'ENOENT') {
|
||||
return null; // Root directory itself not found
|
||||
}
|
||||
// For other EACCES/ENOENT on subdirectories, just skip them.
|
||||
// For other EACCES/ENOENT/EPERM on subdirectories, just skip them.
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user