fix: provide ripgrep for packaged runtimes#379
Conversation
🦋 Changeset detectedLatest commit: 8cb9a5a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e41e2ca12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "$out/libexec/kimi-code/kimi" | ||
|
|
||
| makeWrapper "$out/libexec/kimi-code/kimi" "$out/bin/kimi" \ | ||
| --set-default KIMI_CODE_RG_PATH "${pkgs.ripgrep}/bin/rg" |
There was a problem hiding this comment.
Avoid forcing local rg path for SSH workspaces
When the Nix-packaged CLI is used with an SSHKaos workspace, Grep resolves KIMI_CODE_RG_PATH locally and then passes that absolute path into kaos.exec; SSHKaos turns those args into a command executed on the remote host. This wrapper now sets the variable to the client-side Nix store path, so remotes that have rg on their own PATH but not the exact same /nix/store/.../bin/rg will run a nonexistent command and all Grep searches fail instead of using the remote binary.
Useful? React with 👍 / 👎.
5e41e2c to
d6b52ad
Compare
d6b52ad to
8cb9a5a
Compare
|
是否可以把fd也打包进去?如 #266 (comment) |
Related Issue
No linked issue; this fixes a packaging/runtime failure where search tools cannot find
rgin offline or minimal environments.Problem
Grepdepends on ripgrep. When a packaged runtime has norgonPATHand cannot download the bootstrap archive, the search tool fails before it can inspect files.What changed
KIMI_CODE_RG_PATHas a deterministic ripgrep override and validate it before falling back toPATH, cache, or download.KIMI_CODE_RG_PATHat Nix's ripgrep binary, and added ripgrep to the dev shell.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.