Skip to content

The agent that grows with you

fix(desktop): gh PATH fallback goes through the runnability probe too

teknium111e3bfea268c
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 2333038e0ab..113f16b598e 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -3048,6 +3048,9 @@ function resolveGhBinary() {
} else {
const home = app.getPath('home')
candidates.push('/opt/homebrew/bin/gh', '/usr/local/bin/gh', '/usr/bin/gh', path.join(home, '.local', 'bin', 'gh'))
+ // PATH hits go through the same probe: a bare findOnPath fallback would
+ // re-select an unlaunchable first hit when none of the fixed locations exist.
+ candidates.push(...findPathCandidates('gh'))
}
// Same selection rule as git: an existing-but-unlaunchable candidate (e.g.