build: fix HOMEBREW_FORMULA_PREFIX for head

so that it includes the commit.
This commit is contained in:
ilovezfs 2017-09-06 01:49:10 -07:00
parent 914378cf2e
commit 732bf2212d

View File

@ -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