1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 14:26:46 +00:00

fix: improve robustness of UI output commands by adding || true

This commit is contained in:
Tw93
2025-12-28 21:51:38 +08:00
parent 87d25573a4
commit 6beca2f5fa
3 changed files with 4 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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
}

2
mole
View File

@@ -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