Update core.func

This commit is contained in:
CanbiZ 2025-05-08 10:19:53 +02:00
parent 23a7526995
commit cd1d22d58b

View File

@ -115,9 +115,9 @@ silent() {
run_curl() { run_curl() {
if [ "$VERB" = "no" ]; then if [ "$VERB" = "no" ]; then
curl "$@" 2>/tmp/curl_error.log >/dev/null curl "$@" >/dev/null 2>>/tmp/curl_error.log
else else
curl "$@" curl "$@" 2>>/tmp/curl_error.log
fi fi
} }
@ -137,7 +137,7 @@ curl_handler() {
if [[ -z "$url" ]]; then if [[ -z "$url" ]]; then
msg_error "no valid url or option entered for curl_handler" msg_error "no valid url or option entered for curl_handler"
return 1 exit 1
fi fi
$STD msg_info "Fetching: $url" $STD msg_info "Fetching: $url"
@ -166,7 +166,7 @@ curl_handler() {
rm -f /tmp/curl_error.log rm -f /tmp/curl_error.log
fi fi
__curl_err_handler "$exit_code" "$url" "$curl_stderr" __curl_err_handler "$exit_code" "$url" "$curl_stderr"
return 1 exit 1 # hard exit if exit_code is not 0
fi fi
$STD printf "\r\033[K${INFO}${YW}Retry $attempt/$max_retries in ${delay}s...${CL}" >&2 $STD printf "\r\033[K${INFO}${YW}Retry $attempt/$max_retries in ${delay}s...${CL}" >&2