From 59fd426420da9647506bb2d037936e5178e3f99a Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:55:17 +0200 Subject: [PATCH] [macos] retry powershell meta download (#8571) --- images/macos/provision/core/powershell.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/macos/provision/core/powershell.sh b/images/macos/provision/core/powershell.sh index d503fb4d..428345e5 100644 --- a/images/macos/provision/core/powershell.sh +++ b/images/macos/provision/core/powershell.sh @@ -4,8 +4,8 @@ source ~/utils/utils.sh echo Installing PowerShell... arch=$(get_arch) -psmetadata=$(curl -fsSL "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json") -psver=$(echo $psmetadata | jq -r '.LTSReleaseTag[0]') +download_with_retries "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json" "/tmp" "powershell-metadata.json" +psver=$(cat /tmp/powershell-metadata.json | jq -r '.LTSReleaseTag[0]') psDownloadUrl=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-$arch.pkg\")" "$psver" "$API_PAT") download_with_retries $psDownloadUrl "/tmp" "powershell.pkg"