mirror of
https://github.com/docker/compose.git
synced 2025-07-22 13:14:29 +02:00
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():
|
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:
|
if len(tty_size) != 2:
|
||||||
return 0
|
return 0
|
||||||
_, width = tty_size
|
_, width = tty_size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user