Commit f6b9859
Fix: resolve gh CLI path for macOS GUI apps
macOS GUI apps launched from Finder/Spotlight inherit a minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin) that excludes Homebrew directories.
This causes `Command::new("gh")` to fail with NotFound, showing
"gh CLI not installed" even when gh is installed and working from
the terminal.
Add `find_gh()` helper that checks common Homebrew install locations
(/opt/homebrew/bin/gh, /usr/local/bin/gh) before falling back to
bare `gh` for PATH-based resolution.
Fixes #194
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 14c9600 commit f6b9859
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
12 | 29 | | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
16 | 33 | | |
17 | | - | |
| 34 | + | |
18 | 35 | | |
19 | 36 | | |
20 | 37 | | |
| |||
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
50 | | - | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
| |||
0 commit comments