aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/build.rb')
-rw-r--r--Library/Homebrew/build.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 8dd4fb245..cd2fa4c02 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