From 1fb4101b49e64ceb02e67676c0973aac13c15d79 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 21 Jan 2023 17:58:26 +0800 Subject: [PATCH] Fix msys2 URL, wrt #755 --- scripts/bootstrap/bootstrap-haskell.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap/bootstrap-haskell.ps1 b/scripts/bootstrap/bootstrap-haskell.ps1 index bc847af..1f62b13 100644 --- a/scripts/bootstrap/bootstrap-haskell.ps1 +++ b/scripts/bootstrap/bootstrap-haskell.ps1 @@ -432,12 +432,13 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) { } Print-Msg -msg ('Downloading Msys2 archive {0}...' -f $Msys2Version) $archive = ('msys2-base-x86_64-{0}.sfx.exe' -f $Msys2Version) + $msysUrl = ('https://repo.msys2.org/distrib/x86_64/{0}' -f "$archive") $archivePath = ('{0}\{1}' -f ([IO.Path]::GetTempPath()), "$archive") if ((Get-Command -Name 'curl.exe' -ErrorAction SilentlyContinue) -and !($DisableCurl)) { - Exec "curl.exe" '-o' "$archivePath" ('https://repo.msys2.org/distrib/x86_64/{0}' -f "$archive") + Exec "curl.exe" '-o' "$archivePath" "$msysUrl" } else { - Get-FileWCSynchronous -url ('https://repo.msys2.org/distrib/{0}' -f $archive) -destinationFolder ([IO.Path]::GetTempPath()) -includeStats + Get-FileWCSynchronous -url "$msysUrl" -destinationFolder ([IO.Path]::GetTempPath()) -includeStats } Print-Msg -msg 'Extracting Msys2 archive...'