Преглед изворни кода

Merge pull request #3423 from cmihai/fix-1876

Ignore error output of `stty size` when standard input is not a termi…
Joffrey F пре 8 година
родитељ
комит
9efb00457d
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      compose/cli/formatter.py

+ 1 - 1
compose/cli/formatter.py

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