@@ -5,17 +5,6 @@ NODE_LTS_NAME=${NODE_LTS_NAME:-fermium}
5
5
NODE_ARTIFACTS_PATH=" ${PROJECT_DIRECTORY:- $(pwd)} /node-artifacts"
6
6
if [[ " $OS " = " Windows_NT" ]]; then NODE_ARTIFACTS_PATH=$( cygpath --unix " $NODE_ARTIFACTS_PATH " ) ; fi
7
7
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
-
19
8
mkdir -p " $NODE_ARTIFACTS_PATH /npm_global"
20
9
21
10
# Comparisons are all case insensitive
@@ -24,7 +13,7 @@ shopt -s nocasematch
24
13
# index.tab is a sorted tab separated values file with the following headers
25
14
# 0 1 2 3 4 5 6 7 8 9 10
26
15
# 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
28
17
29
18
while IFS=$' \t ' read -r -a row; do
30
19
node_index_version=" ${row[0]} "
@@ -74,7 +63,7 @@ echo "Node.js ${node_index_version} for ${operating_system}-${architecture} rele
74
63
75
64
set -o xtrace
76
65
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 "
78
67
79
68
if [[ " $file_extension " = " zip" ]]; then
80
69
unzip -q " $node_archive_path " -d " ${NODE_ARTIFACTS_PATH} "
0 commit comments