Skip to content

Commit

Permalink
fix termui breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
dch committed Jun 7, 2023
1 parent a762aba commit abd1079
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import math
import os
import os.path
import shutil
import stat
import sys
from mimetypes import guess_type
Expand Down Expand Up @@ -3079,7 +3080,7 @@ def _get_progress_bar_label(original_label, object_name, prefix='Processing'):
else:
# If the names are too long then we can end up with multiple progress bars since we overflow a single line. To prevent
# this, make sure that the label won't consume more than half the terminal width
terminal_width = click.termui.get_terminal_size()[0] / 2
terminal_width = shutil.get_terminal_size()[0] / 2
remaining_width = terminal_width - (len(prefix) + 1)

if len(object_name) > remaining_width:
Expand Down

0 comments on commit abd1079

Please sign in to comment.