mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: respect nested .gitignore files in search_files (#8804)
This commit is contained in:
parent
b33c082300
commit
a84f7ef77f
1 changed files with 9 additions and 1 deletions
|
|
@ -150,7 +150,15 @@ export async function regexSearchFiles(
|
|||
throw new Error("Could not find ripgrep binary")
|
||||
}
|
||||
|
||||
const args = ["--json", "-e", regex, "--glob", filePattern || "*", "--context", "1", "--no-messages", directoryPath]
|
||||
const args = ["--json", "-e", regex]
|
||||
|
||||
// Only add --glob if a specific file pattern is provided
|
||||
// Using --glob "*" overrides .gitignore behavior, so we omit it when no pattern is specified
|
||||
if (filePattern) {
|
||||
args.push("--glob", filePattern)
|
||||
}
|
||||
|
||||
args.push("--context", "1", "--no-messages", directoryPath)
|
||||
|
||||
let output: string
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue