mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
Fixed Curl Exit Code: Ln: 45
This commit is contained in:
parent
751fe4b8f4
commit
dbeeea8355
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue