From e78225c3497c891032f4dfa212dd4821d5f66e78 Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:49:00 +0200 Subject: [PATCH] [macos] add retries to PyPy installation (#8578) --- images/macos/provision/core/pypy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/macos/provision/core/pypy.sh b/images/macos/provision/core/pypy.sh index d9f0707c..eae5c389 100644 --- a/images/macos/provision/core/pypy.sh +++ b/images/macos/provision/core/pypy.sh @@ -76,11 +76,11 @@ function InstallPyPy } arch=$(get_arch) -pypyVersions=$(curl -fsSL https://downloads.python.org/pypy/versions.json) +download_with_retries "https://downloads.python.org/pypy/versions.json" "/tmp" "pypy-versions.json" toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .arch.'$arch'.versions[]') for toolsetVersion in $toolsetVersions; do - latestMajorPyPyVersion=$(echo $pypyVersions | + latestMajorPyPyVersion=$(cat /tmp/pypy-versions.json | jq -r --arg toolsetVersion $toolsetVersion '.[] | select((.python_version | startswith($toolsetVersion)) and .stable == true).files[] | select(.platform == "darwin").download_url' | head -1)