aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-02-10 17:47:39 -0600
committerJack Nagel2012-02-10 17:54:35 -0600
commitddde478f63666bb090c6351eb29cc58d449f6f0f (patch)
tree2c0638917ed0cfcb78ef4c3d71e3e076e78dc697 /Library
parentc5592b83b2de1ebd4a744c664e64dcbc8b36abe5 (diff)
downloadbrew-ddde478f63666bb090c6351eb29cc58d449f6f0f.tar.bz2
Be gentle when stdout is not a tty
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index e91700c5e..b565d1988 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -33,13 +33,13 @@ end
# args are additional inputs to puts until a nil arg is encountered
def ohai title, *sput
- title = title.to_s[0, Tty.width - 4] unless ARGV.verbose?
+ title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose?
puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}"
puts sput unless sput.empty?
end
def oh1 title
- title = title.to_s[0, Tty.width - 4] unless ARGV.verbose?
+ title = title.to_s[0, Tty.width - 4] if $stdout.tty? unless ARGV.verbose?
puts "#{Tty.green}==> #{Tty.reset}#{title}"
end
@@ -112,6 +112,7 @@ def curl *args
# See https://github.com/mxcl/homebrew/issues/6103
args << "--insecure" if MacOS.version < 10.6
args << "--verbose" if ENV['HOMEBREW_CURL_VERBOSE']
+ args << "--silent" unless $stdout.tty?
safe_system curl, *args
end