Skip to content

Commit

Permalink
Merge pull request #447 from citrus-it/listH
Browse files Browse the repository at this point in the history
pkg list - omit headers if there are no results
  • Loading branch information
hadfl authored Sep 18, 2023
2 parents c22abac + 2c9ca4d commit 5d3b531
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,10 @@ def gen(meta=False):
data = list(gen())
fmt_str = calc_fmtstr(attrs, data)
else:
data = gen()
data = list(gen())

if len(data) == 0:
omit_headers = True

format_output(attrs, fields, data, output_format, fmt_str, omit_headers)

Expand Down

0 comments on commit 5d3b531

Please sign in to comment.