fix(desktop): respect HERMES_GIT_BASH_PATH in findGitBash() (salvage #64339) - #70265
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on ed6b660 all good! |
Port the HERMES_GIT_BASH_PATH env var check from main.cjs to main.ts after the TS conversion. Also extract findGitBash to a dedicated module for testability and add focused regression tests for override precedence and invalid-override fallback.
…t-bash The extracted findGitBash builds Windows-style candidate paths, but the vitest suite (and any POSIX CI host) runs with posix path.join, which mangles 'C:\Program Files' + segments into slash-joined paths and broke the invalid-override fallback test. Use path.win32.join explicitly so candidate construction is host-independent.
…dule npx eslint --fix + prettier --write on the new files: braces on single-line if returns and blank-line padding per the desktop lint config.
teknium1
force-pushed
the
salvage/64339-git-bash-path
branch
from
July 23, 2026 23:24
9f8c89b to
ed6b660
Compare
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
Salvages the desktop-parity subset of PR #64339 by @seamusmore: the Electron desktop's git-bash resolver now honors
HERMES_GIT_BASH_PATH, matching the terminal runtime (tools/environments/local.pyhas honored it all along — the desktop's ownfindGitBashnever checked it).Changes
apps/desktop/electron/find-git-bash.ts(new): resolver extracted into a testable module with the env-override rung first, then well-known install paths, then PATHapps/desktop/electron/main.ts: delegates to the new moduleapps/desktop/electron/find-git-bash.test.ts(new): 4 vitest regression testspath.win32, eslint/prettier conformance, contributor email mappingThe original PR's console/AllocConsole work was mooted by #70205 and is not included — this extracts only the parity fix.
Validation
npx vitest run --project electron)npm run typecheck(3 tsconfigs)Authorship preserved via cherry-pick (contributor commit stat matches the original exactly); rebase-merge.
Closes #64339 (console portion superseded by #70205; parity portion salvaged here).
Infographic