aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2015-02-06 22:36:53 -0500
committerJack Nagel2015-02-07 11:02:35 -0500
commitcd522b171933edd8136ae5ad2bd3bc706dfdbe02 (patch)
tree32137de3ac52a7a690bb2a4d58dafdfc6a38adee /Library/Homebrew
parent4851b1e7a877246d57ca87e9e48b7d962f100015 (diff)
downloadbrew-cd522b171933edd8136ae5ad2bd3bc706dfdbe02.tar.bz2
Always respect build options when invoking post_install
Fixes Homebrew/homebrew#36335.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/postinstall.rb2
-rw-r--r--Library/Homebrew/formula.rb6
-rw-r--r--Library/Homebrew/formula_installer.rb2
3 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb
index 52a2c1d47..8e145d3fd 100644
--- a/Library/Homebrew/cmd/postinstall.rb
+++ b/Library/Homebrew/cmd/postinstall.rb
@@ -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
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index dd90d72ee..867b7689d 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 46a1345ce..5ef6660fd 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -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}`"