File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,15 +417,16 @@ http_download_curl() {
417417 source_url=$2
418418 header=$3
419419 if [ -z " $header " ]; then
420- log_debug " Executing: curl -sfL -o \" $local_file \" \" $source_url \" "
421- curl -sfL -o " $local_file " " $source_url "
420+ log_debug " Executing: curl -sL -o \" $local_file \" \" $source_url \" "
421+ code= $( curl -sL -o " $local_file " " $source_url " )
422422 else
423- log_debug " Executing: curl -sfL -H \" $header \" -o \" $local_file \" \" $source_url \" "
424- curl -sfL -H " $header " -o " $local_file " " $source_url "
423+ log_debug " Executing: curl -sL -H \" $header \" -o \" $local_file \" \" $source_url \" "
424+ code= $( curl -sL -H " $header " -o " $local_file " " $source_url " )
425425 fi
426+ log_debug " http_download_curl received HTTP status $code , return code $? "
426427 if [ $? -ne 0 ]; then
427428 log_err " Failed to download from $source_url "
428- return 1
429+ return 1 # Return 1 for failure
429430 fi
430431 return 0
431432}
You can’t perform that action at this time.
0 commit comments