aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMax Howell2009-11-09 18:24:36 +0000
committerMax Howell2009-11-09 18:24:36 +0000
commit04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9 (patch)
tree21aab0f53457fb844bb86708698b7812172afc71 /Library/Homebrew/utils.rb
parent75c7c942a176b8d2b51335b49e3829694ed44340 (diff)
downloadbrew-04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9.tar.bz2
Ignore stdout during GitDownloadStrategy.stage
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index d980c328c..6ef48ad31 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -159,3 +159,18 @@ def ignore_interrupts
ensure
trap("INT", std_trap)
end
+
+def nostdout
+ if ARGV.verbose?
+ yield
+ else
+ begin
+ require 'stringio'
+ real_stdout = $stdout
+ $stdout = StringIO.new
+ yield
+ ensure
+ $stdout = real_stdout
+ end
+ end
+end \ No newline at end of file