1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 03:34:00 +00:00

feat: add Microsoft Edge old version cleanup and improve vendor directory protection logic.

This commit is contained in:
Tw93
2026-01-02 00:29:58 +08:00
parent 64a9946483
commit 23ffafc415
2 changed files with 86 additions and 0 deletions

View File

@@ -242,9 +242,13 @@ is_php_project_root() {
}
# Check if a vendor directory should be protected from purge
# Expects path to be a vendor directory (basename == vendor)
# Strategy: Only clean PHP Composer vendor, protect all others
is_protected_vendor_dir() {
local path="$1"
local base
base=$(basename "$path")
[[ "$base" == "vendor" ]] || return 1
local parent_dir
parent_dir=$(dirname "$path")