This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-06 12:37:39 +01:00
1 parent 0734aba613
commit 054b528fad
2 files changed
+9 -7

No files matched your search

+4 -2
View File
@@ -194,10 +194,12 @@ async def search_files(
# Try ripgrep first
try:
return await _search_rg(query, full, regex, case_insensitive, include, filenames_only)
res = await _search_rg(query, full, regex, case_insensitive, include, filenames_only)
except FileNotFoundError:
# ripgrep not installed, fall back to Python
return await _search_python(query, full, case_insensitive)
res = await _search_python(query, full, case_insensitive)
return _truncate_output(res, max_chars=30_000)
async def _search_rg(