From 1f4ea27a0bf1086f2abbb22961e8c58d2cff1e6c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 4 Jul 2025 09:32:42 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/misc/core.func b/misc/core.func index 1632b1bd..11914ebe 100644 --- a/misc/core.func +++ b/misc/core.func @@ -351,7 +351,18 @@ msg_info() { msg_ok() { stop_spinner local msg="$1" - echo -e "${BFR:-} ${CM:-✔️} ${GN}${msg}${CL}" + if [[ "${VERBOSE:-no}" != "no" || "${var_os:-}" == "alpine" || ! -t 2 ]]; then + local CHECK="${TAB}✔️${TAB}" + local PREV="${SPINNER_MSG:-}" + + if [[ -n "$PREV" && "$msg" == "$PREV" ]]; then + printf "\r\e[2K%s %b\n" "$CHECK" "${GN}${msg}${CL}" >&2 + else + printf "%s %b\n" "$CHECK" "${GN}${msg}${CL}" >&2 + fi + else + echo -e "${BFR:-} ${CM:-✔️} ${GN}${msg}${CL}" + fi } msg_error() {