diff options
| author | Jack Nagel | 2015-01-12 21:57:18 -0500 |
|---|---|---|
| committer | Jack Nagel | 2015-01-12 21:57:47 -0500 |
| commit | bc27b1837c9fdd6b8ab7a696cf2cdd62ff1c2a9d (patch) | |
| tree | de03ded86ee71aa510319db1cf4b8dea79c7a9c7 /Library | |
| parent | 1ec39240e8b567a05db42c4b21752f20b99a03c8 (diff) | |
| download | homebrew-bc27b1837c9fdd6b8ab7a696cf2cdd62ff1c2a9d.tar.bz2 | |
Omit post-install warning unless formula defines it
Closes #34744.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 727eccdab..4ecb348e6 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -333,6 +333,10 @@ class Formula # Can be overridden to run commands on both source and bottle installation. def post_install; end + def post_install_defined? + method(:post_install).owner == self.class + 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 fb025f0cc..46a1345ce 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -383,7 +383,7 @@ class FormulaInstaller link(keg) fix_install_names(keg) if OS.mac? - if build_bottle? + if build_bottle? && formula.post_install_defined? ohai "Not running post_install as we're building a bottle" puts "You can run it manually using `brew postinstall #{formula.name}`" else |
