Skip to content

Commit

Permalink
Fixed an error when 'apio packages --list' is piped out.
Browse files Browse the repository at this point in the history
  • Loading branch information
zapta committed Nov 17, 2024
1 parent a961c83 commit 0bac48f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apio/pkg_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ def scan_packages(resources: Resources) -> PackageScanResults:
def _list_section(title: str, items: List[List[str]], color: str) -> None:
"""A helper function for printing one serction of list_packages()."""
# -- Construct horizontal lines at terminal width.
output_config = util.get_terminal_config()
line = "─" * output_config.terminal_width
dline = "═" * output_config.terminal_width
config = util.get_terminal_config()
line_width = config.terminal_width if config.terminal_mode() else 80
line = "─" * line_width
dline = "═" * line_width

# -- Print the section.
click.secho()
Expand Down

0 comments on commit 0bac48f

Please sign in to comment.