fix: error out on pip installation / update failure

This commit is contained in:
mayeut 2024-04-26 21:10:28 +02:00
parent b4dd4cdda3
commit d05150c172
No known key found for this signature in database
GPG Key ID: 8B03CED67D3ABFBA

View File

@ -135,6 +135,9 @@ if ($MajorVersion -ne "2") {
Write-Host "Install and upgrade Pip"
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location --root-user-action=ignore"
if ($LASTEXITCODE -ne 0) {
Throw "Error happened during pip installation / upgrade"
}
Write-Host "Create complete file"
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null