Skip to content

Commit cca0c5b

Browse files
committed
fix: Use full path for Python executable in Find-Python
The ProcessStartInfo.FileName requires full path to properly locate python when using pyenv or other PATH-based Python managers. Fixes issue where 'The system cannot find the file specified' error occurs even when python command is available in current session.
1 parent 5077c6c commit cca0c5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function Show-Usage {
9393

9494
function Find-Python {
9595
if (Get-Command py -ErrorAction SilentlyContinue) { return "py -3" }
96-
if (Get-Command python -ErrorAction SilentlyContinue) { return "python" }
97-
if (Get-Command python3 -ErrorAction SilentlyContinue) { return "python3" }
96+
if (Get-Command python -ErrorAction SilentlyContinue) { return (Get-Command python).Source }
97+
if (Get-Command python3 -ErrorAction SilentlyContinue) { return (Get-Command python3).Source }
9898
return $null
9999
}
100100

0 commit comments

Comments
 (0)