From b408b192083d58e57491fbd4b0121c22173ed6dc Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 14 Aug 2013 20:11:11 -0500 Subject: unpack: ensure $VERBOSE is restored --- Library/Contributions/cmd/brew-unpack.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3