2424
2525$ErrorActionPreference = " Stop"
2626
27- $Script :InstallerVersion = " 1.3 .0"
27+ $Script :InstallerVersion = " 1.4 .0"
2828
2929# Force UTF-8 console output so winget's progress glyphs and other tool output
3030# are not rendered as mojibake in legacy code-page consoles.
@@ -419,14 +419,17 @@ function Find-PythonCandidate {
419419
420420 foreach ($name in @ (" python" , " python3" )) {
421421 $cmd = Get-Command $name - ErrorAction SilentlyContinue
422- if (& $isRealPython $cmd ) {
422+ if ($cmd -and -not (& $isRealPython $cmd )) {
423+ Warn " Skipping ${name} : '$ ( $cmd.Source ) ' is the Microsoft Store WindowsApps stub"
424+ }
425+ elseif (& $isRealPython $cmd ) {
423426 $candidates += , @ ($cmd.Source , @ ())
424427 }
425428 }
426429
427430 $py = Get-Command " py" - ErrorAction SilentlyContinue
428431 if ($py ) {
429- foreach ($flag in @ (" -3.12" , " -3.11" , " -3.13" , " -3" )) {
432+ foreach ($flag in @ (" -3.12" , " -3.11" , " -3.13" , " -3.14 " , " -3 " )) {
430433 $candidates += , @ ($py.Source , @ ($flag ))
431434 }
432435 }
@@ -443,6 +446,9 @@ function Find-PythonCandidate {
443446 }
444447 }
445448
449+ if ($candidates.Count -eq 0 ) {
450+ Warn " No Python candidates were discovered (no python/python3 on PATH, no py.exe launcher, no %LOCALAPPDATA%\Programs\Python\Python3* install)."
451+ }
446452 foreach ($pair in $candidates ) {
447453 $result = Test-PythonExecutable $pair [0 ] $pair [1 ]
448454 if ($result ) { return $result }
0 commit comments