fix(windows): prefer Git Bash before PATH bash - #47854
Closed
tt-a1i wants to merge 1 commit into
Closed
Conversation
tonydwb
approved these changes
Jun 17, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Good fix for Windows Git Bash detection. The reordering in _find_bash() now prioritizes known Git-for-Windows installs (from Program Files) over shutil.which("bash"), which on Windows would often return the WSL launcher (C:\Windows\System32\bash.exe) instead of the actual Git Bash.
Looks Good
- Clear comment explaining the rationale for the reordering
- Tests added in a new file covering all four bash-finding priority cases
- No regression risk — fallback path remains intact
Reviewed by Hermes Agent
Contributor
|
Thanks for the focused Windows regression fix. This is already implemented on current
Automated hermes-sweeper review. |
This was referenced Aug 3, 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.
Summary
shutil.which("bash")fallback in_find_bash()HERMES_GIT_BASH_PATHfirst, then Hermes-managed PortableGit/MinGitbashto the WSL launcher whileProgramFiles\Git\bin\bash.exeexistsFixes #47837.
Related PRs
This is narrower than #35675 and #38092:
shutil.which("bash").Testing
$HOME/.hermes/hermes-agent/venv/bin/python -m pytest tests/tools/test_local_find_bash.py -q$HOME/.hermes/hermes-agent/venv/bin/python -m pytest tests/tools/test_local_env_cwd_recovery.py tests/tools/test_local_env_blocklist.py tests/tools/test_local_find_bash.py -q$HOME/.hermes/hermes-agent/venv/bin/python -m compileall -q tools/environments/local.py tests/tools/test_local_find_bash.pygit diff --checkReview
A read-only subagent review found no blocking issues and confirmed this is an independent narrow fix for #47837, not a duplicate of #35675/#38092.