Skip to content

Commit 2ad4009

Browse files
fix: use curl -L with /download suffix for SourceForge installer download on Windows
Co-authored-by: ansgarbecker <ansgarbecker@users.noreply.github.com>
1 parent 46ea9be commit 2ad4009

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎.github/workflows/lazarus.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
shell: pwsh
4040
run: |
4141
$installer = "${env:RUNNER_TEMP}\lazarus-4.8.exe"
42-
Invoke-WebRequest -Uri "https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe" -OutFile $installer
42+
curl.exe -L --retry 3 -o $installer "https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe/download"
43+
if ((Get-Item $installer).Length -lt 100MB) { throw "Lazarus installer download failed: file too small" }
4344
$lazarusDir = "${env:RUNNER_TEMP}\lazarus"
4445
Start-Process -FilePath $installer -ArgumentList "/VERYSILENT", "/SP-", "/SUPPRESSMSGBOXES", "/DIR=$lazarusDir" -Wait -NoNewWindow
4546
Add-Content -Path $env:GITHUB_PATH -Value $lazarusDir

0 commit comments

Comments
 (0)