Fix writing of upgraded packages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
IamTheFij 2024-06-18 23:10:54 -07:00 committed by Ian Fijolek
parent ca7277aea4
commit e870c284da

View File

@ -102,7 +102,10 @@ class Unhacs:
for package in latest_packages: for package in latest_packages:
package.install() package.install()
write_lock_packages(set(latest_packages) | set(packages)) latest_lookup = {p.url: p for p in latest_packages}
packages = [latest_lookup.get(p.url, p) for p in read_lock_packages()]
write_lock_packages(packages)
def list_packages(self, verbose: bool = False): def list_packages(self, verbose: bool = False):
for package in get_installed_packages(): for package in get_installed_packages():