From 6beca2f5fad6031b5f9a3944120380c04948fe73 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 28 Dec 2025 21:51:38 +0800 Subject: [PATCH] fix: improve robustness of UI output commands by adding `|| true` --- lib/core/base.sh | 2 +- lib/core/ui.sh | 4 ++-- mole | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/base.sh b/lib/core/base.sh index 346e89a..6600c8a 100644 --- a/lib/core/base.sh +++ b/lib/core/base.sh @@ -584,7 +584,7 @@ start_section_spinner() { stop_section_spinner() { stop_inline_spinner 2> /dev/null || true if [[ -t 1 ]]; then - echo -ne "\r\033[K" >&2 + echo -ne "\r\033[K" >&2 || true fi } diff --git a/lib/core/ui.sh b/lib/core/ui.sh index b49db38..49b0084 100755 --- a/lib/core/ui.sh +++ b/lib/core/ui.sh @@ -275,7 +275,7 @@ start_inline_spinner() { INLINE_SPINNER_PID=$! disown 2> /dev/null || true else - echo -n " ${BLUE}|${NC} $message" >&2 + echo -n " ${BLUE}|${NC} $message" >&2 || true fi } @@ -293,7 +293,7 @@ stop_inline_spinner() { wait "$INLINE_SPINNER_PID" 2> /dev/null || true INLINE_SPINNER_PID="" # Clear the line - use \033[2K to clear entire line, not just to end - [[ -t 1 ]] && printf "\r\033[2K" >&2 + [[ -t 1 ]] && printf "\r\033[2K" >&2 || true fi } diff --git a/mole b/mole index ce19423..e7bb6f9 100755 --- a/mole +++ b/mole @@ -25,7 +25,7 @@ source "$SCRIPT_DIR/lib/core/common.sh" trap cleanup_temp_files EXIT INT TERM # Version info -VERSION="1.15.3" +VERSION="1.15.4" MOLE_TAGLINE="Deep clean and optimize your Mac." # Check TouchID configuration