Skip to content
Snippets Groups Projects
Unverified Commit efc02899 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #4241 from lukertty/master

Fix Tty.width cannot get the real width in certain terminal like emacs shell
parents 0f65758f 68b2962e
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ module Tty
def width
width = `/bin/stty size 2>/dev/null`.split[1]
width ||= `/usr/bin/tput cols 2>/dev/null`.split[0]
width = `/usr/bin/tput cols 2>/dev/null`.split[0] if width.to_i.zero?
width ||= 80
width.to_i
end
......
......@@ -72,7 +72,7 @@ then
FILTERED_ENV=()
# Filter all but the specific variables.
for VAR in HOME SHELL PATH TERM LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
for VAR in HOME SHELL PATH TERM COLUMNS LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment