Fixed for search option

This commit is contained in:
Dimitris Zlatanidis 2023-01-16 21:34:02 +02:00
parent 3bd4644e77
commit 6961c578ed

View file

@ -189,16 +189,16 @@ class Argparse:
for package in repo_packages:
for pkg in packages:
if method == 'install' and pkg in package:
repo_ver = SBoQueries(package).version()
choices += [(package, repo_ver, False)]
elif method == 'upgrade' and pkg == package:
if method == 'upgrade' and pkg == package:
repo_ver = SBoQueries(package).version()
pkg = self.utils.is_installed(package)
inst_ver = self.utils.split_installed_pkg(pkg)[1]
choices += [(package, f'{inst_ver} -> {repo_ver}', True)]
elif pkg in package:
repo_ver = SBoQueries(package).version()
choices += [(package, repo_ver, False)]
if not choices:
return packages