Merge pull request #3423 from cmihai/fix-1876

Ignore error output of `stty size` when standard input is not a termi…
This commit is contained in:
Joffrey F 2017-03-01 15:50:33 -08:00 committed by GitHub
commit 9efb00457d
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ from compose.cli import colors
def get_tty_width():
tty_size = os.popen('stty size', 'r').read().split()
tty_size = os.popen('stty size 2> /dev/null', 'r').read().split()
if len(tty_size) != 2:
return 0
_, width = tty_size