fix(agent-core): search usr\bin\bash.exe paths for Git Bash on Windows#145
fix(agent-core): search usr\bin\bash.exe paths for Git Bash on Windows#145OPBR wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f96e4e6 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eeaa22a429
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| "@moonshot-ai/kimi-code": patch | |||
There was a problem hiding this comment.
Add the SDK to the release changeset
For Windows SDK users who create sessions, this fix is part of the published SDK artifact too: packages/node-sdk/tsdown.config.ts aliases @moonshot-ai/agent-core to source and alwaysBundles @moonshot-ai/*, while packages/node-sdk/src/rpc.ts constructs KimiCore from that bundled code. With only @moonshot-ai/kimi-code listed here, the release PR will not version/publish @moonshot-ai/kimi-code-sdk, so npm SDK users will not receive the Git Bash detection fix.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 45786e3 — added @moonshot-ai/kimi-code-sdk: patch to the changeset.
Some Git for Windows installations have bash.exe only at <root>\usr\bin\bash.exe while <root>\bin\bash.exe does not exist. Add usr\bin\bash.exe candidates alongside each bin\bash.exe entry in both the hardcoded fallback list and the git.exe inference logic. Also add @moonshot-ai/kimi-code-sdk to the changeset since the SDK bundles agent-core code and calls detectEnvironmentFromNode() on session creation, so Windows SDK users also need this fix.
45786e3 to
f96e4e6
Compare
Related Issue
This is a clear, reproducible bug fix (Windows Git Bash path detection
missing
usr\bin\bash.execandidates).Problem
On some Git for Windows installations,
bash.exeonly exists at<root>\usr\bin\bash.exewhile<root>\bin\bash.exeis absent.The current detection logic only searches
bin\bash.exepaths,causing a "Git Bash not found" startup error on these systems.
What changed
Added
usr\bin\bash.execandidates alongside eachbin\bash.exeentry in both the hardcoded fallback list and
inferGitBashFromGitExe().The function now returns a
string[]of two candidates so the callerchecks them in preference order —
bin\bash.exefirst (it initializesthe MSYS2 environment), then
usr\bin\bash.exeas fallback.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.