Save and restore build attribute
This probably doesn't matter in practice, but I don't want to take any chances.
This commit is contained in:
parent
cd522b1719
commit
9f3d88158b
@ -349,8 +349,10 @@ class Formula
|
|||||||
|
|
||||||
# @private
|
# @private
|
||||||
def run_post_install
|
def run_post_install
|
||||||
self.build = Tab.for_formula(self)
|
build, self.build = self.build, Tab.for_formula(self)
|
||||||
post_install
|
post_install
|
||||||
|
ensure
|
||||||
|
self.build = build
|
||||||
end
|
end
|
||||||
|
|
||||||
# tell the user about any caveats regarding this package, return a string
|
# tell the user about any caveats regarding this package, return a string
|
||||||
@ -628,7 +630,7 @@ class Formula
|
|||||||
|
|
||||||
def run_test
|
def run_test
|
||||||
old_home = ENV["HOME"]
|
old_home = ENV["HOME"]
|
||||||
self.build = Tab.for_formula(self)
|
build, self.build = self.build, Tab.for_formula(self)
|
||||||
mktemp do
|
mktemp do
|
||||||
@testpath = Pathname.pwd
|
@testpath = Pathname.pwd
|
||||||
ENV["HOME"] = @testpath
|
ENV["HOME"] = @testpath
|
||||||
@ -636,6 +638,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
@testpath = nil
|
@testpath = nil
|
||||||
|
self.build = build
|
||||||
ENV["HOME"] = old_home
|
ENV["HOME"] = old_home
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user