Commit d04fa6a
fix: prioritize explicit shell paths over PATH in detection and resolution
The shell detection and resolution were checking PATH entries before
explicit paths, causing the wrong PowerShell version to be found.
Changes:
- lib.rs: Check PowerShell 7 explicit paths BEFORE PATH entries in
get_available_shells()
- manager.rs: Check explicit paths BEFORE PATH entries in
resolve_shell_path()
This ensures PowerShell 7 (C:\Program Files\PowerShell\7\pwsh.exe) is
found and used when installed, rather than falling back to Windows
PowerShell 5 (powershell.exe) from PATH.
Fixes #59
Co-Authored-By: Claude <noreply@anthropic.com>1 parent eca0465 commit d04fa6a
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
207 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
208 | 217 | | |
209 | | - | |
210 | | - | |
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
| 997 | + | |
997 | 998 | | |
998 | 999 | | |
999 | | - | |
1000 | | - | |
| 1000 | + | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1003 | 1008 | | |
1004 | 1009 | | |
1005 | 1010 | | |
| |||
0 commit comments