From a9c83f14a749f6295daafc31440d0f74d1aa27e0 Mon Sep 17 00:00:00 2001 From: Enrico Ghirardi Date: Thu, 1 Jun 2017 12:33:58 +0200 Subject: Use stty instead of tput to get terminal width Fixes https://github.com/Homebrew/brew/issues/2707 --- Library/Homebrew/utils/tty.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew') 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) -- cgit v1.2.3