mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 14:00:05 +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
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user