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
|
||||
def postinstall
|
||||
ARGV.formulae.each {|f| f.post_install }
|
||||
ARGV.formulae.each { |f| f.run_post_install }
|
||||
end
|
||||
end
|
||||
|
||||
@ -347,6 +347,12 @@ class Formula
|
||||
method(:post_install).owner == self.class
|
||||
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
|
||||
def caveats; nil end
|
||||
|
||||
|
||||
@ -594,7 +594,7 @@ class FormulaInstaller
|
||||
end
|
||||
|
||||
def post_install
|
||||
formula.post_install
|
||||
formula.run_post_install
|
||||
rescue Exception => e
|
||||
opoo "The post-install step did not complete successfully"
|
||||
puts "You can try again using `brew postinstall #{formula.name}`"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user