Skip to content

Commit faa5e4d

Browse files
authored
fix: list-files will not ignore entire tree if there's error while browsing (RooCodeInc#2089)
1 parent 3a44bcf commit faa5e4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/glob/list-files.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ export async function listFiles(dirPath: string, recursive: boolean, limit: numb
3636
".*", // '!**/.*' excludes hidden directories, while '!**/.*/**' excludes only their contents. This way we are at least aware of the existence of hidden directories.
3737
].map((dir) => `**/${dir}/**`)
3838

39-
const options = {
39+
const options: Options = {
4040
cwd: dirPath,
4141
dot: true, // do not ignore hidden files/directories
4242
absolute: true,
4343
markDirectories: true, // Append a / on any directories matched (/ is used on windows as well, so dont use path.sep)
4444
gitignore: recursive, // globby ignores any files that are gitignored
4545
ignore: recursive ? dirsToIgnore : undefined, // just in case there is no gitignore, we ignore sensible defaults
4646
onlyFiles: false, // true by default, false means it will list directories on their own too
47+
suppressErrors: true,
4748
}
4849

4950
// * globs all files in one dir, ** globs files in nested directories

0 commit comments

Comments
 (0)