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

improve code quality and fix signal handling

This commit is contained in:
Tw93
2025-12-26 20:34:38 +08:00
parent cebbc8396a
commit a7c989588e
9 changed files with 344 additions and 49 deletions

7
mole
View File

@@ -21,8 +21,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Source common functions
source "$SCRIPT_DIR/lib/core/common.sh"
# Set up cleanup trap for temporary files
trap cleanup_temp_files EXIT INT TERM
# Version info
VERSION="1.14.5"
VERSION="1.14.6"
MOLE_TAGLINE="Deep clean and optimize your Mac."
# Check TouchID configuration
@@ -252,7 +255,7 @@ show_help() {
update_mole() {
# Set up cleanup trap for update process
local update_interrupted=false
trap 'update_interrupted=true; echo ""; log_error "Update interrupted by user"; exit 130' INT TERM
trap 'update_interrupted=true; echo ""; exit 130' INT TERM
# Check if installed via Homebrew
if is_homebrew_install; then