fix(gitSetupShell): do not hardcode bash location#972
Open
xav-ie wants to merge 1 commit into
Open
Conversation
Allow `bash` to resolve from $PATH. This allows environments which do not have `/bin/bash` to resolve their own chosen location.
xav-ie
marked this pull request as ready for review
July 18, 2026 23:54
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.
What / Why / How
The
cross-project-attributiontest sets up temp git repos throughshell: "/bin/bash". That path does not exist on NixOS, where bash lives in theNix profile rather than /bin, so the whole suite fails at setup with ENOENT.
Switch the hardcoded
/bin/bashto a bare"bash"so Node resolves it fromPATH. This keeps bash semantics (the setup runs
git init && git remote add)and matches how shipped code already picks a shell (
commandExists("bash")insrc/runtime.ts). win32 keeps execSync's default shell, unchanged.
Affected platforms
Test-only change; no adapter or product behavior changes. Impacts any host
where bash is not at /bin/bash (NixOS, and other non-FHS layouts).
Test plan
Existing
tests/integration/cross-project-attribution.test.tsis the coverage.On a host without /bin/bash it goes from 5 failing (ENOENT in beforeAll setup)
to 5 passing. No product code changed, so no new test was added; adding one
would only re-test Node + bash.
Verified locally:
Checklist
npm testpassesnpm run typecheckpassesnextbranch