From 85f9883329497c01a179def2f6ad1c68a07b662c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 23 Nov 2014 13:43:35 +0000 Subject: [PATCH] formula_installer: don't always post_install. We don't want to do so when building bottles or we can end up with some weird stuff being bottled unintentionally (and it'll run twice; once before bottling, once afterwards). Fixes Homebrew/homebrew#34349. Closes Homebrew/homebrew#34397. Signed-off-by: Mike McQuaid --- Library/Homebrew/formula_installer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index fe3a00fd2c..09a651eaab 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -395,7 +395,12 @@ class FormulaInstaller link(keg) fix_install_names(keg) if OS.mac? - post_install + if build_bottle? + ohai "Not running post_install as we're building a bottle" + puts "You can run it manually using `brew postinstall #{formula.name}`" + else + post_install + end ohai "Summary" if verbose? or show_summary_heading? puts summary