1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 22:30:08 +00:00

🐛 Optimize uninstallation of mole

This commit is contained in:
Tw93
2025-10-07 11:05:30 +08:00
parent a6fe681ad5
commit e575ed53dc
2 changed files with 17 additions and 13 deletions

11
mole
View File

@@ -332,14 +332,17 @@ remove_mole() {
done
fi
# Clean up configuration and cache (both methods)
if [[ -d "$HOME/.config/mole" ]]; then
rm -rf "$HOME/.config/mole" 2>/dev/null && log_success "Removed configuration"
fi
# Clean up cache first (logs to config)
if [[ -d "$HOME/.cache/mole" ]]; then
rm -rf "$HOME/.cache/mole" 2>/dev/null && log_success "Removed cache"
fi
# Clean up configuration last (contains logs)
if [[ -d "$HOME/.config/mole" ]]; then
log_success "Removed configuration"
rm -rf "$HOME/.config/mole" 2>/dev/null
fi
echo ""
echo -e "${GREEN}✨ Mole has been removed successfully${NC}"
echo ""