From 594828da0809153f4b59085255463e45961509a1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 29 Apr 2025 09:50:51 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 7f714fb..b774bd5 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -762,10 +762,13 @@ function download_with_progress() { local output="$2" if ! command -v pv &>/dev/null; then - $STD apt-get update $STD apt-get install -y pv fi - + if [[ -n "${SPINNER_PID:-}" ]] && kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null + wait "$SPINNER_PID" 2>/dev/null + unset SPINNER_PID + fi set -o pipefail # Content-Length aus HTTP-Header holen