mirror of
https://github.com/tw93/Mole.git
synced 2026-02-11 01:54:16 +00:00
feat: Enhance clean and optimize operations with new configuration constants
This commit is contained in:
@@ -29,7 +29,7 @@ setup() {
|
||||
mkdir -p "$HOME/.cache/mole"
|
||||
|
||||
# Clean any previous test artifacts
|
||||
rm -rf "$HOME/www"/* "$HOME/dev"/*
|
||||
rm -rf "${HOME:?}/www"/* "${HOME:?}/dev"/*
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
@@ -151,7 +151,8 @@ setup() {
|
||||
source '$PROJECT_ROOT/lib/clean/project.sh'
|
||||
is_recently_modified '$HOME/www/old-project/node_modules' || true
|
||||
"
|
||||
[ "$?" -eq 0 ] || [ "$?" -eq 1 ] # Allow both true/false, just check no crash
|
||||
local exit_code=$?
|
||||
[ "$exit_code" -eq 0 ] || [ "$exit_code" -eq 1 ] # Allow both true/false, just check no crash
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
|
||||
@@ -97,7 +97,7 @@ clean_time_machine_failed_backups
|
||||
EOF
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"No failed Time Machine backups found"* ]]
|
||||
[[ "$output" == *"No incomplete backups found"* ]]
|
||||
}
|
||||
|
||||
|
||||
|
||||
13
tests/tmp-clean-home.EmChvN/.config/mole/clean-list.txt
Normal file
13
tests/tmp-clean-home.EmChvN/.config/mole/clean-list.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
# Mole Cleanup Preview - 2025-12-18 17:01:44
|
||||
#
|
||||
# How to protect files:
|
||||
# 1. Copy any path below to ~/.config/mole/whitelist
|
||||
# 2. Run: mo clean --whitelist
|
||||
#
|
||||
# Example:
|
||||
# /Users/*/Library/Caches/com.example.app
|
||||
#
|
||||
|
||||
|
||||
=== User essentials ===
|
||||
/Users/tw93/www/Mole/tests/tmp-clean-home.EmChvN/Library/Caches/TestApp # 4KB
|
||||
Reference in New Issue
Block a user