aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/postinstall.rb2
-rw-r--r--Library/Homebrew/formula_installer.rb12
2 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb
index 6630afba1..f20b7ad54 100644
--- a/Library/Homebrew/cmd/postinstall.rb
+++ b/Library/Homebrew/cmd/postinstall.rb
@@ -2,7 +2,7 @@ require "sandbox"
module Homebrew
def postinstall
- ARGV.resolved_formulae.each { |f| run_post_install(f) }
+ ARGV.resolved_formulae.select(&:post_install_defined?).each { |f| run_post_install(f) }
end
def run_post_install(formula)
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 9ea9b31ae..ba1da07bf 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -400,11 +400,13 @@ class FormulaInstaller
link(keg)
fix_install_names(keg)
- 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.full_name}`"
- else
- post_install
+ if formula.post_install_defined?
+ if build_bottle?
+ ohai "Not running post_install as we're building a bottle"
+ puts "You can run it manually using `brew postinstall #{formula.full_name}`"
+ else
+ post_install
+ end
end
ohai "Summary" if verbose? || show_summary_heading?