From e6ccbc44309fce6173708e3dbc85d59746791dc0 Mon Sep 17 00:00:00 2001 From: "io.shift" Date: Tue, 12 Aug 2025 13:38:44 -0500 Subject: [PATCH] **Improve error handling:** `(scripts/install-for-ci.sh`: *Ln: 34-47* (#607) * Improve error handling: ln: 34-47 * Fixed Spacing: Ln: 34 * Fixed Curl Exit Code: Ln: 45 --- scripts/install-for-ci.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/install-for-ci.sh b/scripts/install-for-ci.sh index f675830..0664043 100644 --- a/scripts/install-for-ci.sh +++ b/scripts/install-for-ci.sh @@ -33,10 +33,16 @@ log () { fetch () { echo "Downloading $1..." - if curl --no-progress-bar --retry 10 -o $2 -L $1; then - return 0; + if curl --no-progress-bar --retry 10 --connect-timeout 30 \ + --max-time 300 -o "$2" -L "$1" 2>&1; then + echo "✓ Successfully downloaded $1" + return 0 else - echo "Failed to download $1." + code=$? # capture curl's exit code immediately + echo "✗ Failed to download $1" + echo " URL: $1" + echo " Destination: $2" + echo " Curl exit code: $code" exit 1 fi }