diff options
Diffstat (limited to 'Library/Homebrew/utils/tty.rb')
| -rw-r--r-- | Library/Homebrew/utils/tty.rb | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index 642a33b91..e872e6460 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -6,7 +6,10 @@ module Tty    end    def width -    (`/bin/stty size`.split[1] || 80).to_i +    width = `/bin/stty size 2>/dev/null`.split[1] +    width ||= `/usr/bin/tput cols 2>/dev/null`.split[0] +    width ||= 80 +    width.to_i    end    def truncate(string) | 
