From d05150c17299218791deff36b55d00483efd12a5 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 26 Apr 2024 21:10:28 +0200 Subject: [PATCH] fix: error out on pip installation / update failure --- installers/win-setup-template.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installers/win-setup-template.ps1 b/installers/win-setup-template.ps1 index f0ea70d5..39a67fc4 100644 --- a/installers/win-setup-template.ps1 +++ b/installers/win-setup-template.ps1 @@ -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