Use stty instead of tput to get terminal width
Fixes https://github.com/Homebrew/brew/issues/2707
This commit is contained in:
parent
63b2eb9ffd
commit
a9c83f14a7
@ -6,7 +6,7 @@ module Tty
|
|||||||
end
|
end
|
||||||
|
|
||||||
def width
|
def width
|
||||||
`/usr/bin/tput cols`.strip.to_i
|
(`/bin/stty size`.split[1] || 80).to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def truncate(string)
|
def truncate(string)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user