Don't store test Proc if we might need to marshall the formula
Procs cannot be marshalled, but formula objects may be as part of the BuildError exception. If the formula object has a reference to a Proc, this will fail. Work around it by not storing the test Procs during installations.
This commit is contained in:
parent
0949d952dc
commit
003a9e7fd7
@ -800,7 +800,11 @@ private
|
||||
|
||||
def test &block
|
||||
return @test unless block_given?
|
||||
@test = block
|
||||
# If this formula is the executing script, we are performing an
|
||||
# install. Since it may be marshalled back to the main process as
|
||||
# part of an exception, don't store this Proc because Procs can't
|
||||
# be marshalled.
|
||||
@test = block unless $0 != HOMEBREW_BREW_FILE.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user