Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/tools/patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,14 @@
from rich.syntax import Syntax

# console width is COLUMNS env var minus 12, or just 160 if GITHUB_ACTIONS env is not empty
console_width = (int(os.environ.get("COLUMNS", 160)) - 12) if os.environ.get("GITHUB_ACTIONS", "") == "" else 160
if os.environ.get("GITHUB_ACTIONS", "") == "":
try:
console_width = int(os.environ.get("COLUMNS", 160))
except ValueError:
console_width = 160
console_width = max(console_width, 120) - 12
else:
console_width = 160
console = Console(color_system="standard", width=console_width, highlight=False)

# Use Rich to print a summary of the patches
Expand Down
Loading