From fda353e827bfc12d01689059c20ad26f92611789 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sun, 10 Jun 2018 04:29:34 -0700 Subject: [PATCH] formula_installer: don't pass spec arguments from ARGV to postinstall Postinstall should be executed with the spec of the target formula not the spec argument from ARGV, otherwise the prefix can be incorrect. In other words, if the stable version of a dependency gets installed, postinstall for the dependency should use the prefix of the dependency's stable version, not the prefix of its devel or head version. Fixes #2941. --- Library/Homebrew/formula_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index c2fb81432e..4ba3a7416f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -858,7 +858,7 @@ class FormulaInstaller -- #{HOMEBREW_LIBRARY_PATH}/postinstall.rb #{formula.path} - ].concat(ARGV.options_only) + ].concat(ARGV.options_only) - ["--HEAD", "--devel"] if formula.head? args << "--HEAD"