From 732bf2212d1d52e4f14bef82df94ba4ed537b5fb Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Wed, 6 Sep 2017 01:49:10 -0700 Subject: [PATCH] build: fix HOMEBREW_FORMULA_PREFIX for head so that it includes the commit. --- Library/Homebrew/build.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 8dd4fb245f..cd2fa4c022 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -112,6 +112,10 @@ class Build formula.extend(Debrew::Formula) if ARGV.debug? formula.brew do |_formula, staging| + # For head builds, HOMEBREW_FORMULA_PREFIX should include the commit, + # which is not known until after the formula has been staged. + ENV["HOMEBREW_FORMULA_PREFIX"] = formula.prefix + staging.retain! if ARGV.keep_tmp? formula.patch