Skip to content

Commit 59fd426

Browse files
[macos] retry powershell meta download (#8571)
1 parent 0253f21 commit 59fd426

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

images/macos/provision/core/powershell.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ source ~/utils/utils.sh
44
echo Installing PowerShell...
55
arch=$(get_arch)
66

7-
psmetadata=$(curl -fsSL "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json")
8-
psver=$(echo $psmetadata | jq -r '.LTSReleaseTag[0]')
7+
download_with_retries "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json" "/tmp" "powershell-metadata.json"
8+
psver=$(cat /tmp/powershell-metadata.json | jq -r '.LTSReleaseTag[0]')
99
psDownloadUrl=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-$arch.pkg\")" "$psver" "$API_PAT")
1010
download_with_retries $psDownloadUrl "/tmp" "powershell.pkg"
1111

0 commit comments

Comments
 (0)