From 7b0f489ea2da5a02d7a22e516f974b370a9660da Mon Sep 17 00:00:00 2001 From: "roomote[bot]" <219738659+roomote[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:51:06 -0400 Subject: [PATCH] fix: add --no-messages flag to ripgrep to suppress file access errors (#6757) Fixes #6756 When ripgrep encounters file access errors (e.g., permission denied), it would cause the search_files tool to return empty results. Adding the --no-messages flag suppresses these error messages while still showing pattern syntax errors, allowing the search to continue and return valid results from accessible files. Co-authored-by: Roo Code --- src/services/ripgrep/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ripgrep/index.ts b/src/services/ripgrep/index.ts index c694221966..d384b27c91 100644 --- a/src/services/ripgrep/index.ts +++ b/src/services/ripgrep/index.ts @@ -150,7 +150,7 @@ export async function regexSearchFiles( throw new Error("Could not find ripgrep binary") } - const args = ["--json", "-e", regex, "--glob", filePattern || "*", "--context", "1", directoryPath] + const args = ["--json", "-e", regex, "--glob", filePattern || "*", "--context", "1", "--no-messages", directoryPath] let output: string try {