From 46859a11d0914246fc996e8495c4e406cbd093e0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 7 May 2025 16:01:33 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/core.func b/misc/core.func index 5b64a3c..31205f6 100644 --- a/misc/core.func +++ b/misc/core.func @@ -1,6 +1,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/LICENSE +set -euo pipefail SPINNER_PID="" SPINNER_ACTIVE=0 SPINNER_MSG="" @@ -87,16 +88,19 @@ community_curl() { exit_code=$? if [[ $exit_code -eq 0 ]]; then + stop_spinner + msg_ok "Fetched: $url" printf '%s' "$result" return 0 fi if ((attempt >= max_retries)); then + stop_spinner __curl_err_handler "$exit_code" return 1 fi - # inline retry message (overwrite line) + # Print retry inline printf "\r\033[K${INFO}${YW}Retry $attempt/$max_retries in ${delay}s...${CL}" >&2 sleep "$delay" ((attempt++))