Commit 4321350
Detect tests: honor RF_TEST_NO_DETECT_APPS in the Unix fallback too
Resolve-RfClaudeCliPath's macOS/Linux fallback unconditionally checked
/usr/local/bin/claude and /opt/homebrew/bin/claude, so on any dev box
with Claude Code installed the Pester "claude is nowhere" tests in
Detect.Tests.ps1 picked up the real binary and failed. The Windows
install-dir probe already respected RF_TEST_NO_DETECT_APPS=1 for
exactly this reason; the Unix branch was missed.
Add the same guard. New-RfIsolatedHome already sets the flag, so the
Detect tests inherit it; the Resolve / Test-RfHostClaudeCodeCli
BeforeEach blocks now only clear it on Windows (they need the
install-dir probe to fire against the fake APPDATA tree).
Pester on macOS dev box: 53/53 passing (was 51/53). Windows behavior
unchanged because the new guard sits inside `if Test-RfMacOS -or
Test-RfLinux`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e7d217c commit 4321350
2 files changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
179 | 188 | | |
180 | 189 | | |
181 | 190 | | |
| |||
0 commit comments