mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:04:42 +00:00
feat(debug): add detailed debug output for clean operations
- Add classify_cleanup_risk() for risk level classification (LOW/MEDIUM/HIGH) - Enhance safe_clean() with operation details and risk info - Show item counts and file lists in debug mode - Support for lib/clean/user.sh debug enhancements - Part of GitHub issue #242 implementation
This commit is contained in:
@@ -522,13 +522,25 @@ clean_browsers() {
|
||||
safe_clean ~/Library/Caches/company.thebrowser.Browser/* "Arc cache"
|
||||
safe_clean ~/Library/Caches/company.thebrowser.dia/* "Dia cache"
|
||||
safe_clean ~/Library/Caches/BraveSoftware/Brave-Browser/* "Brave cache"
|
||||
safe_clean ~/Library/Caches/Firefox/* "Firefox cache"
|
||||
local firefox_running=false
|
||||
if pgrep -x "Firefox" > /dev/null 2>&1; then
|
||||
firefox_running=true
|
||||
fi
|
||||
if [[ "$firefox_running" == "true" ]]; then
|
||||
echo -e " ${YELLOW}${ICON_WARNING}${NC} Firefox is running · cache cleanup skipped"
|
||||
else
|
||||
safe_clean ~/Library/Caches/Firefox/* "Firefox cache"
|
||||
fi
|
||||
safe_clean ~/Library/Caches/com.operasoftware.Opera/* "Opera cache"
|
||||
safe_clean ~/Library/Caches/com.vivaldi.Vivaldi/* "Vivaldi cache"
|
||||
safe_clean ~/Library/Caches/Comet/* "Comet cache"
|
||||
safe_clean ~/Library/Caches/com.kagi.kagimacOS/* "Orion cache"
|
||||
safe_clean ~/Library/Caches/zen/* "Zen cache"
|
||||
safe_clean ~/Library/Application\ Support/Firefox/Profiles/*/cache2/* "Firefox profile cache"
|
||||
if [[ "$firefox_running" == "true" ]]; then
|
||||
echo -e " ${YELLOW}${ICON_WARNING}${NC} Firefox is running · profile cache cleanup skipped"
|
||||
else
|
||||
safe_clean ~/Library/Application\ Support/Firefox/Profiles/*/cache2/* "Firefox profile cache"
|
||||
fi
|
||||
clean_chrome_old_versions
|
||||
clean_edge_old_versions
|
||||
clean_edge_updater_old_versions
|
||||
|
||||
Reference in New Issue
Block a user