aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-06-02 16:32:14 +0100
committerGitHub2017-06-02 16:32:14 +0100
commit0731a68cde75206682ed972beb47930afa3c434e (patch)
tree3587c5351f88aa8ca0f138be1145eb39073b4faf
parentce80485aa4c1c0e6e2ee99414801937fa6c291d0 (diff)
parenta9c83f14a749f6295daafc31440d0f74d1aa27e0 (diff)
downloadbrew-0731a68cde75206682ed972beb47930afa3c434e.tar.bz2
Merge pull request #2714 from choco/stty-width
Use stty instead of tput to get terminal width
-rw-r--r--Library/Homebrew/utils/tty.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb
index 505165dc5..642a33b91 100644
--- a/Library/Homebrew/utils/tty.rb
+++ b/Library/Homebrew/utils/tty.rb
@@ -6,7 +6,7 @@ module Tty
end
def width
- `/usr/bin/tput cols`.strip.to_i
+ (`/bin/stty size`.split[1] || 80).to_i
end
def truncate(string)