mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:39:42 +00:00
chore: auto format code
This commit is contained in:
@@ -27,7 +27,10 @@ readonly SENSITIVE_DATA_PATTERNS=(
|
||||
)
|
||||
|
||||
# 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
|
||||
# Returns decoded string if valid, empty string otherwise
|
||||
@@ -171,8 +174,8 @@ batch_uninstall_applications() {
|
||||
local needs_sudo=false
|
||||
local app_owner=$(get_file_owner "$app_path")
|
||||
local current_user=$(whoami)
|
||||
if [[ ! -w "$(dirname "$app_path")" ]] || \
|
||||
[[ "$app_owner" == "root" ]] || \
|
||||
if [[ ! -w "$(dirname "$app_path")" ]] ||
|
||||
[[ "$app_owner" == "root" ]] ||
|
||||
[[ -n "$app_owner" && "$app_owner" != "$current_user" ]]; then
|
||||
needs_sudo=true
|
||||
fi
|
||||
@@ -401,7 +404,7 @@ batch_uninstall_applications() {
|
||||
# These are often missed by standard cleanup tools
|
||||
# Format: ~/Library/Preferences/ByHost/com.app.id.XXXX.plist
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user