Avoid trying to upgrade nothing
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
IamTheFij 2024-06-20 15:23:22 -07:00
parent 72bd76031d
commit 5ac4bad870

View File

@ -126,7 +126,11 @@ class Unhacs:
) )
upgrade_packages.append(latest_package) upgrade_packages.append(latest_package)
if input("Upgrade all packages? (y/N) ").lower() != "y": if not upgrade_packages:
print("Nothing to upgrade")
return
if input("Upgrade all packages? (y/N) ").strip().lower() != "y":
return return
for installed_package in upgrade_packages: for installed_package in upgrade_packages: