Skip to content

Commit

Permalink
fix: error out on pip installation / update failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Apr 26, 2024
1 parent b4dd4cd commit d05150c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions installers/win-setup-template.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d05150c

Please sign in to comment.