diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index b5dffb38c6..6bf6be477f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1591,7 +1591,7 @@ on_request: installed_on_request?, options:) keg = Keg.new(formula.prefix) skip_linkage = formula.bottle_specification.skip_relocation? - keg.replace_placeholders_with_locations(tab.changed_files, skip_linkage:) if tab.changed_files + keg.replace_placeholders_with_locations(tab.changed_files, skip_linkage:) cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag) return if [:any, :any_skip_relocation].include?(cellar) diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 883b9b849b..d65d00746c 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -167,7 +167,7 @@ class Keg relocation end - sig { params(files: T::Array[Pathname], skip_linkage: T::Boolean).void } + sig { params(files: T.nilable(T::Array[Pathname]), skip_linkage: T::Boolean).void } def replace_placeholders_with_locations(files, skip_linkage: false) relocation = prepare_relocation_to_locations.freeze relocate_dynamic_linkage(relocation) unless skip_linkage