diff options
| author | Max Howell | 2009-11-09 18:24:36 +0000 |
|---|---|---|
| committer | Max Howell | 2009-11-09 18:24:36 +0000 |
| commit | 04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9 (patch) | |
| tree | 21aab0f53457fb844bb86708698b7812172afc71 /Library/Homebrew/utils.rb | |
| parent | 75c7c942a176b8d2b51335b49e3829694ed44340 (diff) | |
| download | brew-04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9.tar.bz2 | |
Ignore stdout during GitDownloadStrategy.stage
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 15 |
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 |
