From 6961c578ede75030293652627e9907107856da04 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 16 Jan 2023 21:34:02 +0200 Subject: [PATCH] Fixed for search option --- slpkg/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slpkg/main.py b/slpkg/main.py index 2f267e57..40812866 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -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