Browse Source

Merge pull request #3423 from cmihai/fix-1876

Ignore error output of `stty size` when standard input is not a termi…
Joffrey F 8 năm trước cách đây
mục cha
commit
9efb00457d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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