List packages before removing

This commit is contained in:
IamTheFij 2024-09-18 08:58:41 -07:00
parent 5f0b0ce8b5
commit ee7ae5785c

View File

@ -235,13 +235,20 @@ class Unhacs:
) )
] ]
if packages_to_remove and input("Remove all packages? (y/N) ").lower() != "y":
return
if package_names and not packages_to_remove: if package_names and not packages_to_remove:
print("No packages found to remove") print("No packages found to remove")
return return
print("Packages to remove:")
for package in packages_to_remove:
print(package)
if (
packages_to_remove
and input("Remove listed packages? (y/N) ").lower() != "y"
):
return
remaining_packages = [ remaining_packages = [
package package
for package in self.read_lock_packages() for package in self.read_lock_packages()