Repository navigation
🐋🔧:install ripgrep so Todo Tree can find one - #1783
Merged
Merged
Conversation
The extension fails to start on every attach:
Todo-Tree: Failed to find vscode-ripgrep - please install ripgrep
manually and set 'todo-tree.ripgrep' to point to the executable
It resolves `rg` by trying, in order, the configured todo-tree.ripgrep
path, then four hardcoded locations under vscode.env.appRoot:
node_modules and node_modules.asar.unpacked, each joined with either
vscode-ripgrep/bin/rg or @vscode/ripgrep/bin/rg. Current VS Code ships
@vscode/ripgrep-universal/bin/<arch>/rg instead, so all four miss, and
with nothing configured the extension gives up.
Two things are needed, because every one of those probes is a bare
fs.existsSync and none of them consults PATH:
- Install the binary. Debian trixie packages ripgrep 14.1.1, so it joins
fish in the Dockerfile's existing apt call for the same reason fish is
there: one apt call for something the distribution already has, baked
into a cached layer, no feature required.
- Point todo-tree.ripgrep at /usr/bin/rg. Installing alone would not have
fixed anything.
The setting goes in devcontainer.json rather than .vscode/settings.json
because it is an absolute container path, and that file is shared with
anyone opening the repo outside this container -- where /usr/bin/rg is
usually wrong. That is harmless in practice, since a failed existsSync
just falls through to the next candidate, but it would still be asserting
something untrue of that environment. This is the same split #1779 landed
for dprint.path.
Not pinned, per the DL3008 note already in this file: Debian drops
superseded versions, so a pin would fail the build at the first security
update, and nothing raises PRs for apt pins the way renovate does
elsewhere here.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
648402c installed rg and pointed Todo Tree at it, but got the setting name wrong: it set `todo-tree.ripgrep`, when the extension actually resolves the path via `getConfiguration("todo-tree.ripgrep").ripgrep` -- a config *section* lookup, not a leaf key. That call resolves to the setting ID `todo-tree.ripgrep.ripgrep`, per the extension's own package.json schema. VS Code silently drops unknown setting keys, so the wrong one never reached the extension; it fell through to its hardcoded vscode-ripgrep/@vscode/ripgrep probes, which still miss under current VS Code's @vscode/ripgrep-universal layout, and gave up with the same error the previous commit was meant to fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
OpenINFbot
approved these changes
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐋 dev container
🔧 bug fix
Why
The Todo Tree extension fails to start on every attach:
Reading the extension's bundled
ripgrepPath(), it tries the configuredtodo-tree.ripgreppath first, then four hardcoded locations undervscode.env.appRoot:node_modulesandnode_modules.asar.unpacked,each joined with
vscode-ripgrep/bin/rgor@vscode/ripgrep/bin/rg.Current VS Code ships
@vscode/ripgrep-universal/bin/<arch>/rg, whichmatches none of the four, and this container has no
rgof its own -- soevery candidate misses and the extension gives up.
What this does
Two changes, because each probe is a bare
fs.existsSyncand none ofthem consults
PATH-- installing the binary alone would not have fixedthis:
ripgrepto the existing apt call. Debian trixiepackages 14.1.1, so it earns its place next to
fishon exactly thereasoning already written there -- one apt call for something the
distribution already ships, baked into a cached layer, no feature
needed. Left unpinned per the same file's DL3008 note.
"todo-tree.ripgrep": "/usr/bin/rg".The setting goes in
devcontainer.jsonrather than.vscode/settings.jsonbecause it is an absolute container path, and thatfile is shared with anyone opening the repo outside this container, where
/usr/bin/rgis usually wrong (Homebrew uses/opt/homebrew/bin). Beingwrong there is harmless -- a failed
existsSyncjust falls through -- butit would still assert something untrue of that environment. Same split
#1779 just landed for
dprint.path.Test plan
apt-get install ripgrepin the running container lands at/usr/bin/rg;rg --versionreports 14.1.1.fs.existsSync("/usr/bin/rg")istrue and the executable bit is set, so the configured path wins on
the first candidate.
nps verify.dockerfile(dprint),verify.json(biome), andverify.valid-for-ecall exit 0, re-run after rebasing onto the v5base image and the build(deps-dev): bump all #1780/chore(deps): lock file maintenance #1782 dependency bumps.
(the settings block is seeded at create time, so a reload alone will
not pick it up).
🤖 Generated with Claude Code