@@ -5,17 +5,6 @@ NODE_LTS_NAME=${NODE_LTS_NAME:-fermium}
55NODE_ARTIFACTS_PATH=" ${PROJECT_DIRECTORY:- $(pwd)} /node-artifacts"
66if [[ " $OS " = " Windows_NT" ]]; then NODE_ARTIFACTS_PATH=$( cygpath --unix " $NODE_ARTIFACTS_PATH " ) ; fi
77
8- CURL_FLAGS=(
9- --fail # Exit code 1 if request fails
10- --compressed # Request a compressed response should keep fetching fast
11- --location # Follow a redirect
12- --retry 8 # Retry HTTP 408, 429, 500, 502, 503 or 504, 8 times
13- --silent # Do not print a progress bar
14- --show-error # Despite the silent flag still print out errors
15- --max-time 900 # 900 seconds is 15 minutes, evergreen times out at 20
16- --continue-at - # If a download is interrupted it can figure out where to resume
17- )
18-
198mkdir -p " $NODE_ARTIFACTS_PATH /npm_global"
209
2110# Comparisons are all case insensitive
@@ -24,7 +13,7 @@ shopt -s nocasematch
2413# index.tab is a sorted tab separated values file with the following headers
2514# 0 1 2 3 4 5 6 7 8 9 10
2615# version date files npm v8 uv zlib openssl modules lts security
27- curl " ${CURL_FLAGS[@]} " " https://nodejs.org/dist/index.tab" --output node_index.tab
16+ curl --retry 8 -sS " https://nodejs.org/dist/index.tab" --max-time 300 --output node_index.tab
2817
2918while IFS=$' \t ' read -r -a row; do
3019 node_index_version=" ${row[0]} "
@@ -74,7 +63,7 @@ echo "Node.js ${node_index_version} for ${operating_system}-${architecture} rele
7463
7564set -o xtrace
7665
77- curl " ${CURL_FLAGS[@]} " " ${node_download_url} " --output " $node_archive_path "
66+ curl --fail --retry 8 -sS " ${node_download_url} " --max-time 300 --output " $node_archive_path "
7867
7968if [[ " $file_extension " = " zip" ]]; then
8069 unzip -q " $node_archive_path " -d " ${NODE_ARTIFACTS_PATH} "
0 commit comments