unpack: ensure $VERBOSE is restored
This commit is contained in:
parent
a7a35efff4
commit
b408b19208
@ -34,10 +34,13 @@ class Formula
|
|||||||
alias do_patch patch
|
alias do_patch patch
|
||||||
def patch
|
def patch
|
||||||
if ARGV.flag? '--patch'
|
if ARGV.flag? '--patch'
|
||||||
# Yes Ruby, we are about to redefine a constant. Just breathe.
|
begin
|
||||||
orig_v = $VERBOSE; $VERBOSE = nil
|
old_verbose = $VERBOSE
|
||||||
Formula.const_set 'DATA', ScriptDataReader.load(path)
|
$VERBOSE = nil
|
||||||
$VERBOSE = orig_v
|
Formula.const_set 'DATA', ScriptDataReader.load(path)
|
||||||
|
ensure
|
||||||
|
$VERBOSE = old_verbose
|
||||||
|
end
|
||||||
|
|
||||||
do_patch
|
do_patch
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user