Skip to content

Commit

Permalink
fix: support min width not detectable
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Mar 28, 2024
1 parent d5fb6fb commit a995b78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
+++++++++

1.2.1 (2024-03-28)
==================

- Avoid error when terminal width is undetectable on Python < 3.11
(PR :pr:`761`)

1.2.0 (2024-03-27)
==================
Expand Down
2 changes: 2 additions & 0 deletions src/build/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def _showwarning(


_max_terminal_width = shutil.get_terminal_size().columns - 2
if _max_terminal_width <= 0:
_max_terminal_width = 78

Check warning on line 73 in src/build/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/build/__main__.py#L73

Added line #L73 was not covered by tests


_fill = partial(textwrap.fill, subsequent_indent=' ', width=_max_terminal_width)
Expand Down

0 comments on commit a995b78

Please sign in to comment.