remove unnecessary build options manipulation for test and postinstall
We already loaded build options in ARGV.resolved_formulae for test and postinstall
This commit is contained in:
parent
91a47a9ed6
commit
e008f6e53c
@ -836,14 +836,6 @@ class Formula
|
|||||||
method(:post_install).owner == self.class
|
method(:post_install).owner == self.class
|
||||||
end
|
end
|
||||||
|
|
||||||
# @private
|
|
||||||
def run_post_install
|
|
||||||
build, self.build = self.build, Tab.for_formula(self)
|
|
||||||
post_install
|
|
||||||
ensure
|
|
||||||
self.build = build
|
|
||||||
end
|
|
||||||
|
|
||||||
# Tell the user about any caveats regarding this package.
|
# Tell the user about any caveats regarding this package.
|
||||||
# @return [String]
|
# @return [String]
|
||||||
# <pre>def caveats
|
# <pre>def caveats
|
||||||
@ -1346,7 +1338,6 @@ class Formula
|
|||||||
old_home = ENV["HOME"]
|
old_home = ENV["HOME"]
|
||||||
old_curl_home = ENV["CURL_HOME"]
|
old_curl_home = ENV["CURL_HOME"]
|
||||||
ENV["CURL_HOME"] = old_curl_home || old_home
|
ENV["CURL_HOME"] = old_curl_home || old_home
|
||||||
build, self.build = self.build, Tab.for_formula(self)
|
|
||||||
mktemp("#{name}-test") do |staging|
|
mktemp("#{name}-test") do |staging|
|
||||||
staging.retain! if ARGV.keep_tmp?
|
staging.retain! if ARGV.keep_tmp?
|
||||||
@testpath = staging.tmpdir
|
@testpath = staging.tmpdir
|
||||||
@ -1361,7 +1352,6 @@ class Formula
|
|||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
@testpath = nil
|
@testpath = nil
|
||||||
self.build = build
|
|
||||||
ENV["HOME"] = old_home
|
ENV["HOME"] = old_home
|
||||||
ENV["CURL_HOME"] = old_curl_home
|
ENV["CURL_HOME"] = old_curl_home
|
||||||
end
|
end
|
||||||
|
@ -13,7 +13,7 @@ begin
|
|||||||
|
|
||||||
formula = ARGV.resolved_formulae.first
|
formula = ARGV.resolved_formulae.first
|
||||||
formula.extend(Debrew::Formula) if ARGV.debug?
|
formula.extend(Debrew::Formula) if ARGV.debug?
|
||||||
formula.run_post_install
|
formula.post_install
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
Marshal.dump(e, error_pipe)
|
Marshal.dump(e, error_pipe)
|
||||||
error_pipe.close
|
error_pipe.close
|
||||||
|
Loading…
x
Reference in New Issue
Block a user