1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 11:05:09 +00:00

chore: auto format code

This commit is contained in:
Tw93
2025-12-25 03:27:51 +00:00
parent 952b2eea61
commit 4aaab78985

View File

@@ -27,7 +27,10 @@ readonly SENSITIVE_DATA_PATTERNS=(
) )
# Join patterns into a single regex for grep # Join patterns into a single regex for grep
SENSITIVE_DATA_REGEX=$(IFS='|'; echo "${SENSITIVE_DATA_PATTERNS[*]}") SENSITIVE_DATA_REGEX=$(
IFS='|'
echo "${SENSITIVE_DATA_PATTERNS[*]}"
)
# Decode and validate base64 encoded file list # Decode and validate base64 encoded file list
# Returns decoded string if valid, empty string otherwise # Returns decoded string if valid, empty string otherwise
@@ -171,8 +174,8 @@ batch_uninstall_applications() {
local needs_sudo=false local needs_sudo=false
local app_owner=$(get_file_owner "$app_path") local app_owner=$(get_file_owner "$app_path")
local current_user=$(whoami) local current_user=$(whoami)
if [[ ! -w "$(dirname "$app_path")" ]] || \ if [[ ! -w "$(dirname "$app_path")" ]] ||
[[ "$app_owner" == "root" ]] || \ [[ "$app_owner" == "root" ]] ||
[[ -n "$app_owner" && "$app_owner" != "$current_user" ]]; then [[ -n "$app_owner" && "$app_owner" != "$current_user" ]]; then
needs_sudo=true needs_sudo=true
fi fi
@@ -401,7 +404,7 @@ batch_uninstall_applications() {
# These are often missed by standard cleanup tools # These are often missed by standard cleanup tools
# Format: ~/Library/Preferences/ByHost/com.app.id.XXXX.plist # Format: ~/Library/Preferences/ByHost/com.app.id.XXXX.plist
if [[ -d ~/Library/Preferences/ByHost ]]; then if [[ -d ~/Library/Preferences/ByHost ]]; then
find ~/Library/Preferences/ByHost -maxdepth 1 -name "${bundle_id}.*.plist" -delete 2>/dev/null || true find ~/Library/Preferences/ByHost -maxdepth 1 -name "${bundle_id}.*.plist" -delete 2> /dev/null || true
fi fi
fi fi