mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 16:25:17 +00:00
🐛 Fix some dry-run issues
This commit is contained in:
@@ -649,9 +649,10 @@ readonly PRESERVED_BUNDLE_PATTERNS=("${SYSTEM_CRITICAL_BUNDLES[@]}" "${DATA_PROT
|
|||||||
should_preserve_bundle() {
|
should_preserve_bundle() {
|
||||||
local bundle_id="$1"
|
local bundle_id="$1"
|
||||||
for pattern in "${PRESERVED_BUNDLE_PATTERNS[@]}"; do
|
for pattern in "${PRESERVED_BUNDLE_PATTERNS[@]}"; do
|
||||||
if [[ "$bundle_id" == $pattern ]]; then
|
# Use case for safer glob matching
|
||||||
return 0
|
case "$bundle_id" in
|
||||||
fi
|
$pattern) return 0 ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -660,9 +661,10 @@ should_preserve_bundle() {
|
|||||||
should_protect_from_uninstall() {
|
should_protect_from_uninstall() {
|
||||||
local bundle_id="$1"
|
local bundle_id="$1"
|
||||||
for pattern in "${SYSTEM_CRITICAL_BUNDLES[@]}"; do
|
for pattern in "${SYSTEM_CRITICAL_BUNDLES[@]}"; do
|
||||||
if [[ "$bundle_id" == $pattern ]]; then
|
# Use case for safer glob matching
|
||||||
return 0
|
case "$bundle_id" in
|
||||||
fi
|
$pattern) return 0 ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -672,9 +674,10 @@ should_protect_data() {
|
|||||||
local bundle_id="$1"
|
local bundle_id="$1"
|
||||||
# Protect both system critical and data protected bundles during cleanup
|
# Protect both system critical and data protected bundles during cleanup
|
||||||
for pattern in "${SYSTEM_CRITICAL_BUNDLES[@]}" "${DATA_PROTECTED_BUNDLES[@]}"; do
|
for pattern in "${SYSTEM_CRITICAL_BUNDLES[@]}" "${DATA_PROTECTED_BUNDLES[@]}"; do
|
||||||
if [[ "$bundle_id" == $pattern ]]; then
|
# Use case for safer glob matching
|
||||||
return 0
|
case "$bundle_id" in
|
||||||
fi
|
$pattern) return 0 ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user