Skip to content

Commit e5072e3

Browse files
authored
fix: support min width not detectable (#761)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent d5fb6fb commit e5072e3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
+++++++++
44

5+
1.2.1 (2024-03-28)
6+
==================
7+
8+
- Avoid error when terminal width is undetectable on Python < 3.11
9+
(PR :pr:`761`)
510

611
1.2.0 (2024-03-27)
712
==================

src/build/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def _showwarning(
6969

7070

7171
_max_terminal_width = shutil.get_terminal_size().columns - 2
72+
if _max_terminal_width <= 0:
73+
_max_terminal_width = 78
7274

7375

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

0 commit comments

Comments
 (0)