fix(agent): fall back when rg is blocked for @folder references

This commit is contained in:
Ruzzgar 2026-04-17 23:43:01 +03:00 committed by Teknium
parent 8a6aa5882e
commit 60236862ee
2 changed files with 27 additions and 3 deletions

View file

@ -483,9 +483,7 @@ def _rg_files(path: Path, cwd: Path, limit: int) -> list[Path] | None:
text=True,
timeout=10,
)
except FileNotFoundError:
return None
except subprocess.TimeoutExpired:
except (FileNotFoundError, OSError, subprocess.TimeoutExpired):
return None
if result.returncode != 0:
return None