1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 13:16:47 +00:00

fix: mole may broke cache and data of surge mac (#46)

* fix: mole may broke cache and data of surge mac

* chore: typo
This commit is contained in:
Carolyn Sun
2025-11-11 09:58:04 +08:00
committed by GitHub
parent 23f788c19e
commit 3d87bcc71c
3 changed files with 8 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ mo --version # Show installed version
- Safety first, if your Mac is mission-critical, wait for Mole to mature before full cleanups.
- Preview the cleanup by running `mo clean --dry-run` and reviewing the generated list.
- Protect caches with `mo clean --whitelist`; defaults cover Playwright, HuggingFace, and Maven paths.
- Protect caches with `mo clean --whitelist`; defaults cover Playwright, HuggingFace, Maven, and Surge Mac paths.
- Use `mo touchid` to approve sudo with Touch ID instead of typing your password.
## Quick Launchers

View File

@@ -34,6 +34,8 @@ declare -a DEFAULT_WHITELIST_PATTERNS=(
"$HOME/.cache/huggingface*"
"$HOME/.m2/repository/*"
"$HOME/.ollama/models/*"
"$HOME/Library/Caches/com.nssurge.surge-mac/*"
"$HOME/Library/Application Support/com.nssurge.surge-mac/*"
)
declare -a WHITELIST_PATTERNS=()
WHITELIST_WARNINGS=()

View File

@@ -18,6 +18,8 @@ declare -a DEFAULT_WHITELIST_PATTERNS=(
"$HOME/.cache/huggingface*"
"$HOME/.m2/repository/*"
"$HOME/.ollama/models/*"
"$HOME/Library/Caches/com.nssurge.surge-mac/*"
"$HOME/Library/Application Support/com.nssurge.surge-mac/*"
)
# Save whitelist patterns to config
@@ -28,7 +30,7 @@ save_whitelist_patterns() {
cat > "$WHITELIST_CONFIG" << 'EOF'
# Mole Whitelist - Protected paths won't be deleted
# Default protections: Playwright browsers, HuggingFace models, Maven repo, Ollama models
# Default protections: Playwright browsers, HuggingFace models, Maven repo, Ollama models, Surge Mac
# Add one pattern per line to keep items safe.
EOF
@@ -118,6 +120,8 @@ Safari web browser cache|$HOME/Library/Caches/com.apple.Safari/*|browser_cache
Chrome browser cache|$HOME/Library/Caches/Google/Chrome/*|browser_cache
Firefox browser cache|$HOME/Library/Caches/Firefox/*|browser_cache
Brave browser cache|$HOME/Library/Caches/BraveSoftware/Brave-Browser/*|browser_cache
Surge proxy cache|$HOME/Library/Caches/com.nssurge.surge-mac/*|network_tools
Surge configuration and data|$HOME/Library/Application Support/com.nssurge.surge-mac/*|network_tools
Docker Desktop image cache|$HOME/Library/Containers/com.docker.docker/Data/*|container_cache
Podman container cache|$HOME/.local/share/containers/cache/*|container_cache
Font cache|$HOME/Library/Caches/com.apple.FontRegistry/*|system_cache