gemini-cli - 💡(How to fix) Fix Title: getRipgrepPath() never falls back to system PATH — ripgrep unavailable despite being installed [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26777Fetched 2026-05-11 03:28:40
View on GitHub
Comments
2
Participants
2
Timeline
12
Reactions
0
Timeline (top)
labeled ×7commented ×2added_to_project_v2 ×1issue_type_added ×1

Fix Action

Fix / Workaround

Workaround: Copy system rg to bundle/vendor/ripgrep/rg-win32-x64.exe inside the Gemini CLI install dir.

RAW_BUFFERClick to expand / collapse

Environment: gemini --version

→ 0.41.1 (git e1a54496d)

rg --version

→ ripgrep 15.1.0 ✓

OS: Windows 11, win32

  • Install method: npm install -g @google/gemini-cli
  • ripgrep: installed via winget install BurntSushi.ripgrep.MSVC (in system PATH, rg --version works)

Bug: getRipgrepPath() in bundle/chunk-NET4RIEQ.js only checks two paths relative to its own bundle dir: vendor/ripgrep/rg-win32-x64.exe ../../vendor/ripgrep/rg-win32-x64.exe Neither path contains the bundled binary after a standard npm install -g. System PATH is never consulted. Result: "Ripgrep is not available. Falling back to GrepTool." even when rg is installed and functional.

Repro: npm install -g @google/gemini-cli winget install BurntSushi.ripgrep.MSVC gemini -p "test"

→ "Ripgrep is not available. Falling back to GrepTool."

rg --version

→ ripgrep 15.1.0 ✓

Expected: Fall back to where rg (Windows) / which rg (Unix) when bundled binary not found.

Suggested fix: async function getRipgrepPath() { // ... existing candidate paths ... for (const candidate of candidatePaths) { if (await fileExists(candidate)) return candidate; } // Fallback: check system PATH try { const { execFileSync } = require('child_process'); const found = process.platform === 'win32' ? execFileSync('where', ['rg'], { encoding: 'utf8' }).split('\n')[0].trim() : execFileSync('which', ['rg'], { encoding: 'utf8' }).trim(); if (found && await fileExists(found)) return found; } catch (_) {} return null; }

Workaround: Copy system rg to bundle/vendor/ripgrep/rg-win32-x64.exe inside the Gemini CLI install dir.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Title: getRipgrepPath() never falls back to system PATH — ripgrep unavailable despite being installed [2 comments, 2 participants]