aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2017-09-10 03:23:01 -0700
committerGitHub2017-09-10 03:23:01 -0700
commite108cf8cf57835a99a19dc84d26aea3b3cd8917f (patch)
tree1130d3d5bd9f05137cd27ff599879f29c812c89c /Library
parent914378cf2ef8104a4659772945e5f77945ea16cd (diff)
parent732bf2212d1d52e4f14bef82df94ba4ed537b5fb (diff)
downloadbrew-e108cf8cf57835a99a19dc84d26aea3b3cd8917f.tar.bz2
Merge pull request #3129 from ilovezfs/fix-formula-prefix-envvar-for-head
build: fix HOMEBREW_FORMULA_PREFIX for head
Diffstat (limited to 'Library')
-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