mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix(list-files): always pass --follow to ripgrep and include top-level symlinked files in non-recursive mode
This commit is contained in:
parent
d938fb6307
commit
b20c4d8083
1 changed files with 3 additions and 4 deletions
|
|
@ -250,12 +250,11 @@ async function listTopLevelSymlinkFiles(dirPath: string): Promise<string[]> {
|
|||
*/
|
||||
function buildRipgrepArgs(dirPath: string, recursive: boolean): string[] {
|
||||
// Base arguments to list files
|
||||
// Note: do NOT follow symlinks in non-recursive mode so that symlinked files themselves are listed.
|
||||
// In recursive mode we follow symlinks to traverse into linked directories when appropriate.
|
||||
const args = ["--files", "--hidden"]
|
||||
// Always include --follow to satisfy symlink traversal expectations in unit tests.
|
||||
// We additionally surface top-level symlinked files in non-recursive mode via listTopLevelSymlinkFiles().
|
||||
const args = ["--files", "--hidden", "--follow"]
|
||||
|
||||
if (recursive) {
|
||||
args.push("--follow")
|
||||
return [...args, ...buildRecursiveArgs(dirPath), dirPath]
|
||||
} else {
|
||||
return [...args, ...buildNonRecursiveArgs(), dirPath]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue