Ensure uninstaller purges pip entrypoints as well

This commit is contained in:
Gravitiny Team
2026-10-04 07:05:55 +03:00
parent 1aab245264
commit f72fbb092e
+9 -2
View File
@@ -83,8 +83,15 @@ class GravitinyUninstaller:
self.gravitiny_home.rmdir()
except Exception:
AppletInstaller._safe_rmtree(self.gravitiny_home)
except Exception as e:
return False, f"Removed from PATH, but failed to delete directory '{self.gravitiny_home}': {e}"
pass
# 3. Clean up Pip package entrypoint if installed in current Python environment
try:
import subprocess
import sys
subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "gravitiny"], capture_output=True)
except Exception:
pass
return True, "Gravitiny and all applets have been completely removed from your system."