Skip to content

Commit a76d67f

Browse files
authored
Rollup merge of #67572 - aidanhs:aphs-choco-direct-cdn, r=Mark-Simulacrum
Use the chocolatey CDN directly to avoid the flaky API
2 parents 20d5df9 + cefeb66 commit a76d67f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/ci/scripts/install-msys2.sh

+10-6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ IFS=$'\n\t'
1212
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1313

1414
if isWindows; then
15-
for RETRY_COUNT in 1 2 3 4 5 6 7 8 9 10; do
16-
choco install msys2 \
17-
--params="/InstallDir:$(ciCheckoutPath)/msys2 /NoPath" -y --no-progress \
18-
&& mkdir -p "$(ciCheckoutPath)/msys2/home/${USERNAME}" \
19-
&& ciCommandAddPath "$(ciCheckoutPath)/msys2/usr/bin" && break
20-
done
15+
# Pre-followed the api/v2 URL to the CDN since the API can be a bit flakey
16+
curl -sSL https://packages.chocolatey.org/msys2.20190524.0.0.20191030.nupkg > \
17+
msys2.nupkg
18+
curl -sSL https://packages.chocolatey.org/chocolatey-core.extension.1.3.5.1.nupkg > \
19+
chocolatey-core.extension.nupkg
20+
choco install -s . msys2 \
21+
--params="/InstallDir:$(ciCheckoutPath)/msys2 /NoPath" -y --no-progress
22+
rm msys2.nupkg chocolatey-core.extension.nupkg
23+
mkdir -p "$(ciCheckoutPath)/msys2/home/${USERNAME}"
24+
ciCommandAddPath "$(ciCheckoutPath)/msys2/usr/bin"
2125
fi

0 commit comments

Comments
 (0)