mirror of https://github.com/docker/compose.git
Ignore error output of `stty size` when stdin is not a terminal.
Fixes #1876 Signed-off-by: Mihai Ciumeica <cmihai@email.com>
This commit is contained in:
parent
67dc90ec0e
commit
790280ba72
|
@ -10,7 +10,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
|
||||
|
|
Loading…
Reference in New Issue