shuishen
6 days ago f67d43a43f6c3e58922e3c2f457dd9caafebfc67
scripts/check-environment.ps1
@@ -6,6 +6,14 @@
Write-Host "Python installations:"
py -0p
$PythonCandidates = @(
    (Join-Path $env:LOCALAPPDATA "Programs/Python/Python312/python.exe"),
    (Join-Path $env:LOCALAPPDATA "Programs/Python/Python311/python.exe"),
    (Join-Path $env:ProgramFiles "Python312/python.exe"),
    (Join-Path $env:ProgramFiles "Python311/python.exe")
)
$SupportedPython = $PythonCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1
Write-Host ""
Write-Host "Node:"
node --version
@@ -18,7 +26,8 @@
}
Write-Host ""
if ((py -0p | Select-String "3.11|3.12")) {
if ($SupportedPython) {
    Write-Host "Detected: $(& $SupportedPython --version) at $SupportedPython"
    Write-Host "Python version: ready" -ForegroundColor Green
} else {
    Write-Warning "Install Python 3.11 or 3.12 before running setup.ps1."