Always respect build options when invoking post_install
Fixes Homebrew/homebrew#36335.
This commit is contained in:
parent
4851b1e7a8
commit
cd522b1719
@ -1,5 +1,5 @@
|
|||||||
module Homebrew
|
module Homebrew
|
||||||
def postinstall
|
def postinstall
|
||||||
ARGV.formulae.each {|f| f.post_install }
|
ARGV.formulae.each { |f| f.run_post_install }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -347,6 +347,12 @@ class Formula
|
|||||||
method(:post_install).owner == self.class
|
method(:post_install).owner == self.class
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @private
|
||||||
|
def run_post_install
|
||||||
|
self.build = Tab.for_formula(self)
|
||||||
|
post_install
|
||||||
|
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
|
||||||
def caveats; nil end
|
def caveats; nil end
|
||||||
|
|
||||||
|
|||||||
@ -594,7 +594,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def post_install
|
def post_install
|
||||||
formula.post_install
|
formula.run_post_install
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
opoo "The post-install step did not complete successfully"
|
opoo "The post-install step did not complete successfully"
|
||||||
puts "You can try again using `brew postinstall #{formula.name}`"
|
puts "You can try again using `brew postinstall #{formula.name}`"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user