diff --git a/scripts/install-for-ci.sh b/scripts/install-for-ci.sh index fb7bcad..0664043 100644 --- a/scripts/install-for-ci.sh +++ b/scripts/install-for-ci.sh @@ -34,14 +34,15 @@ log () { fetch () { echo "Downloading $1..." if curl --no-progress-bar --retry 10 --connect-timeout 30 \ - --max-time 300 -o "$2" -L "$1" 2>&1; then + --max-time 300 -o "$2" -L "$1" 2>&1; then echo "✓ Successfully downloaded $1" return 0 else + code=$? # capture curl's exit code immediately echo "✗ Failed to download $1" echo " URL: $1" echo " Destination: $2" - echo " Curl exit code: $?" + echo " Curl exit code: $code" exit 1 fi }