diff --git a/.gitea/workflows/build-windows-release.yml b/.gitea/workflows/build-windows-release.yml index 8bf225b..52bc268 100644 --- a/.gitea/workflows/build-windows-release.yml +++ b/.gitea/workflows/build-windows-release.yml @@ -78,8 +78,9 @@ jobs: $pythonUrl = 'https://www.python.org/ftp/python/3.12.10/python-3.12.10-amd64.exe' Write-Host "Downloading Python from $pythonUrl" Invoke-WebRequest -Uri $pythonUrl -OutFile $installer - & $installer /quiet InstallAllUsers=0 TargetDir=$pythonRoot Include_pip=1 Include_test=0 PrependPath=0 - if ($LASTEXITCODE -ne 0) { throw "Python installer failed, exit code: $LASTEXITCODE" } + $installArgs = @('/quiet', 'InstallAllUsers=0', "TargetDir=$pythonRoot", 'Include_pip=1', 'Include_test=0', 'PrependPath=0') + $proc = Start-Process -FilePath $installer -ArgumentList $installArgs -Wait -PassThru + if ($proc.ExitCode -ne 0) { throw "Python installer failed, exit code: $($proc.ExitCode)" } } if (-not (Test-Path $pythonExe)) { throw "Python installation finished but python.exe was not found: $pythonExe" } $pythonArgs = @()