mirror of
https://github.com/tw93/Mole.git
synced 2026-03-23 13:35:07 +00:00
🐛 Optimize uninstallation of mole
This commit is contained in:
16
mole
16
mole
@@ -265,11 +265,6 @@ remove_mole() {
|
||||
if [[ ${#manual_installs[@]} -gt 0 ]]; then
|
||||
for install in "${manual_installs[@]}"; do
|
||||
echo -e " ${GREEN}✓${NC} $install"
|
||||
local install_dir="$(dirname "$install")"
|
||||
local install_root="$(dirname "$install_dir")"
|
||||
if [[ -d "$install_root/lib" ]]; then
|
||||
echo -e " ${GREEN}✓${NC} $install_root/lib/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -322,17 +317,6 @@ remove_mole() {
|
||||
log_error "Failed to remove $install (try with sudo)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove lib directory if it exists
|
||||
local install_dir="$(dirname "$install")"
|
||||
local install_root="$(dirname "$install_dir")"
|
||||
if [[ -d "$install_root/lib" ]]; then
|
||||
if rm -rf "$install_root/lib" 2>/dev/null; then
|
||||
log_success "Removed library files from $install_root"
|
||||
else
|
||||
log_warning "Could not remove $install_root/lib (may need sudo)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user