From 4de01663bcb7ebf7f7598e3040452ba4f55cccc6 Mon Sep 17 00:00:00 2001 From: danielnachun Date: Tue, 7 Dec 2021 10:59:08 -0800 Subject: [PATCH] formula_installer.rb: call relocate_build_prefix --- Library/Homebrew/formula_installer.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 288fc09eff..6e5848c372 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1228,6 +1228,14 @@ class FormulaInstaller keg = Keg.new(formula.prefix) skip_linkage = formula.bottle_specification.skip_relocation? keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage + + cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag) + return if [:any, :any_skip_relocation].include?(cellar) + + prefix = Pathname(cellar).parent.to_s + return if cellar == HOMEBREW_CELLAR.to_s && prefix == HOMEBREW_PREFIX.to_s + + keg.relocate_build_prefix(keg, prefix, HOMEBREW_PREFIX) end sig { params(output: T.nilable(String)).void }