1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-24 00:55:08 +00:00

Fix the problem of password input error and re-entry

This commit is contained in:
Tw93
2025-11-25 11:18:40 +08:00
parent 494fdf0700
commit 4aa50ac715
2 changed files with 16 additions and 20 deletions

17
mole
View File

@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/lib/common.sh"
# Version info
VERSION="1.10.12"
VERSION="1.10.13"
MOLE_TAGLINE="can dig deep to clean your Mac."
# Check if Touch ID is already configured
@@ -274,6 +274,21 @@ update_mole() {
local install_dir
install_dir="$(cd "$(dirname "$mole_path")" && pwd)"
local requires_sudo="false"
if [[ ! -w "$install_dir" ]]; then
requires_sudo="true"
elif [[ -e "$install_dir/mole" && ! -w "$install_dir/mole" ]]; then
requires_sudo="true"
fi
if [[ "$requires_sudo" == "true" ]]; then
if ! request_sudo_access "Mole update requires admin access"; then
log_error "Update aborted (admin access denied)"
rm -f "$tmp_installer"
exit 1
fi
fi
if [[ -t 1 ]]; then
start_inline_spinner "Installing update..."
else