diff options
| author | Jack Nagel | 2015-02-06 22:36:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2015-02-07 11:02:35 -0500 |
| commit | c7a9d32c69b805b1ac5d8f2e3cf7479e3639b3d2 (patch) | |
| tree | 1128cde9388a1d55fee7a0dd71898998964b4f02 | |
| parent | 91310e4f722490b359053e0a4d48cd83a5ee4915 (diff) | |
| download | homebrew-c7a9d32c69b805b1ac5d8f2e3cf7479e3639b3d2.tar.bz2 | |
Always respect build options when invoking post_install
Fixes #36335.
| -rw-r--r-- | Library/Homebrew/cmd/postinstall.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 2 |
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}`" |
