1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-11 22:53:59 +00:00

fix: Add Library directory existence check to clean script and enhance test script for bats version compatibility.

This commit is contained in:
Tw93
2026-01-03 12:30:53 +08:00
parent 4aab7890c3
commit ac5c0e3c9d
2 changed files with 17 additions and 4 deletions

View File

@@ -18,6 +18,10 @@ clean_user_essentials() {
}
clean_empty_library_items() {
if [[ ! -d "$HOME/Library" ]]; then
return 0
fi
local -a empty_dirs=()
while IFS= read -r -d '' dir; do
[[ -d "$dir" ]] && empty_dirs+=("$dir")