diff options
| author | Jack Nagel | 2013-08-14 20:11:11 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-14 20:11:11 -0500 |
| commit | b408b192083d58e57491fbd4b0121c22173ed6dc (patch) | |
| tree | e382741ea839642ad30d164ac9e56dfd7b850f4f /Library | |
| parent | a7a35efff4369122db9fa0cb10332303ca0f81ad (diff) | |
| download | brew-b408b192083d58e57491fbd4b0121c22173ed6dc.tar.bz2 | |
unpack: ensure $VERBOSE is restored
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-unpack.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index f97ac5e7a..a61bf8164 100755 --- a/Library/Contributions/cmd/brew-unpack.rb +++ b/Library/Contributions/cmd/brew-unpack.rb @@ -34,10 +34,13 @@ class Formula alias do_patch patch def patch if ARGV.flag? '--patch' - # Yes Ruby, we are about to redefine a constant. Just breathe. - orig_v = $VERBOSE; $VERBOSE = nil - Formula.const_set 'DATA', ScriptDataReader.load(path) - $VERBOSE = orig_v + begin + old_verbose = $VERBOSE + $VERBOSE = nil + Formula.const_set 'DATA', ScriptDataReader.load(path) + ensure + $VERBOSE = old_verbose + end do_patch end |
