Skip to content

Commit

Permalink
PR feedback: fix retrieve_packages_info
Browse files Browse the repository at this point in the history
  • Loading branch information
petersutter committed Mar 13, 2024
1 parent 34cc082 commit afa037f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hacks/ghelp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def parse_package_info(package_info, provided_binaries, name_key, version_key, i

def retrieve_packages_info(installed_tools_list, package_manager, show_command, version_delimiter, delimiter, name_key, version_key, info_key):
tools = []
if not installed_tools_list:
return tools

provided_binaries = {}
tool_names = []
for entry in installed_tools_list:
Expand Down Expand Up @@ -79,11 +82,13 @@ if ghelp_info is None:
exit(1)

apttools = retrieve_packages_info(ghelp_info["apt"], "apt", "show", "=", "\n\n" , "Package", "Version", "Description")
piptools = retrieve_packages_info(ghelp_info["pip"], "pip", "show", "==", "---", "Name", "Version", "Summary")
downloaded_tools = retrieve_downloaded_tools_info(ghelp_info["downloaded"])
hack_tools = retrieve_hacks_info()

table = []
table.extend(apttools)
table.extend(piptools)
table.extend(downloaded_tools)
table.extend(hack_tools)

Expand Down

0 comments on commit afa037f

Please sign in to comment.