Use stty instead of tput to get terminal width

Fixes https://github.com/Homebrew/brew/issues/2707
This commit is contained in:
Enrico Ghirardi 2017-06-01 12:33:58 +02:00
parent 63b2eb9ffd
commit a9c83f14a7
No known key found for this signature in database
GPG Key ID: 0E50ED7482D3286E

View File

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