depot/third_party/nixpkgs/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch
Default email ca5ab3a501 Project import generated by Copybara.
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
2022-07-14 08:49:19 -04:00

21 lines
732 B
Diff

diff --git a/samcli/commands/_utils/table_print.py b/samcli/commands/_utils/table_print.py
index de63af29..a9d0f2fe 100644
--- a/samcli/commands/_utils/table_print.py
+++ b/samcli/commands/_utils/table_print.py
@@ -7,6 +7,7 @@ from functools import wraps
from typing import Sized
import click
+import shutil
MIN_OFFSET = 20
@@ -30,7 +31,7 @@ def pprint_column_names(
def pprint_wrap(func):
# Calculate terminal width, number of columns in the table
- width, _ = click.get_terminal_size()
+ width, _ = shutil.get_terminal_size()
# For UX purposes, set a minimum width for the table to be usable
# and usable_width keeps margins in mind.
width = max(width, min_width)