diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-08 16:23:16 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-08 16:27:23 -0400 |
commit | 4ee172e66cd76c22da4d3b991f9eb92523266d0e (patch) | |
tree | 3399524fc495217b465a6f24d19ccda1f8b716ef | |
parent | 16f83b5799f976b5ca839103fc83628ccc11b01f (diff) | |
download | haskell-4ee172e66cd76c22da4d3b991f9eb92523266d0e.tar.gz |
get-win32-tarballs: Fix incorrect parenthesization
Previously the download fallback wasn't parenthesized correctly,
resulting in the mirror being consulted regardless of whether the
downloads.haskell.org download succeeded.
Fixes #18821.
-rwxr-xr-x | mk/get-win32-tarballs.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index 32f27059c7..2e28e541b2 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -37,11 +37,13 @@ download_file() { return else echo "Downloading ${description} to ${dest_dir}..." - $curl_cmd || echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk || { - rm -f "${dest_file}" - fail "ERROR: Download failed." - exit 1 - } + $curl_cmd || ( + echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk || { + rm -f "${dest_file}" + fail "ERROR: Download failed." + exit 1 + } + ) fi fi @@ -55,11 +57,13 @@ download_file() { else local curl_cmd_bnk="true" fi - $curl_cmd || echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk || { + $curl_cmd || ( + echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk || { rm -f "${dest_file}.sig" fail "ERROR: Download failed." exit 1 } + ) fi if test "$verify" = "1" |