Browse Source

Ignore error output of `stty size` when stdin is not a terminal.

Fixes #1876

Signed-off-by: Mihai Ciumeica <[email protected]>
Mihai 9 years ago
parent
commit
790280ba72
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compose/cli/formatter.py

+ 1 - 1
compose/cli/formatter.py

@@ -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