diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index d1766755c7..bfd60b56f5 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1235,6 +1235,8 @@ class FormulaInstaller prefix = Pathname(cellar).parent.to_s return if cellar == HOMEBREW_CELLAR.to_s && prefix == HOMEBREW_PREFIX.to_s + return unless ENV["HOMEBREW_RELOCATE_BUILD_PREFIX"] + keg.relocate_build_prefix(keg, prefix, HOMEBREW_PREFIX) end