You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log "curl failed with exit code $exit_code on attempt $attempt"
41
+
fi
42
+
43
+
attempt=$((attempt +1))
44
+
done
45
+
46
+
error "curl failed after $CURL_MAX_RETRIES attempts"
47
+
return$exit_code
48
+
}
49
+
20
50
# Parse command line options
21
51
INSTALL_ANDROID=false
22
52
INSTALL_STATIC_LINUX=false
@@ -125,7 +155,7 @@ find_latest_swift_version() {
125
155
log "Fetching releases from swift.org API..."
126
156
127
157
local releases_json
128
-
releases_json=$(curl -fsSL "${SWIFT_API_INSTALL_ROOT}/releases.json")|| fatal "Failed to fetch Swift releases"
158
+
releases_json=$(curl_with_retry -fsSL "${SWIFT_API_INSTALL_ROOT}/releases.json")|| fatal "Failed to fetch Swift releases"
129
159
130
160
# Find all releases that start with the minor version (e.g, "6.1")
131
161
# Sort them and get the latest one
@@ -212,7 +242,7 @@ find_latest_sdk_snapshot() {
212
242
log "Fetching development snapshots from swift.org API..."
213
243
214
244
local sdk_json
215
-
sdk_json=$(curl -fsSL "${SWIFT_API_INSTALL_ROOT}/dev/${version}/${sdk_name}-sdk.json")|| fatal "Failed to fetch ${sdk_name}-sdk development snapshots"
245
+
sdk_json=$(curl_with_retry -fsSL "${SWIFT_API_INSTALL_ROOT}/dev/${version}/${sdk_name}-sdk.json")|| fatal "Failed to fetch ${sdk_name}-sdk development snapshots"
216
246
217
247
# Extract the snapshot tag from the "dir" field of the first (newest) element
0 commit comments