Comment needed changes if HOMEBREW_LIBRARY changes

This commit is contained in:
Shaun Jackman 2020-12-16 14:03:10 -08:00
parent 58fe675d97
commit c56681a227
4 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,8 @@ require "utils/shell"
#
# @api private
module FormulaCellarChecks
# If the location of HOMEBREW_LIBRARY changes
# keg_relocate.rb, test/global_spec.rb, and this constant need to change.
REPOSITORY_AND_NOT_LIBRARY_REGEX = %r{#{HOMEBREW_REPOSITORY}(?!/Library/)}.freeze
def check_env_path(bin)

View File

@ -5,6 +5,9 @@ class Keg
PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@"
CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@"
REPOSITORY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@"
# If the location of HOMEBREW_LIBRARY changes
# formula_cellar_checks.rb, test/global_spec.rb, and this constant need to change.
LIBRARY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@/Library"
Relocation = Struct.new(:old_prefix, :old_cellar, :old_repository, :old_library,

View File

@ -9,6 +9,8 @@ describe "brew", :integration_test do
.and be_a_success
end
# If the location of HOMEBREW_LIBRARY changes
# keg_relocate.rb, formula_cellar_checks.rb, and this test need to change.
it "ensures that HOMEBREW_LIBRARY=HOMEBREW_REPOSITORY/Library" do
expect(HOMEBREW_LIBRARY.to_s).to eq("#{HOMEBREW_REPOSITORY}/Library")
end

View File

@ -58,6 +58,8 @@ then
fi
fi
# If the location of HOMEBREW_LIBRARY changes
# keg_relocate.rb, formula_cellar_checks.rb, and test/global_spec.rb need to change.
HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
# Copy and export all HOMEBREW_* variables previously mentioned in