Skip to content

Commit

Permalink
Merge pull request #16108 from Bo98/api-rename-fix
Browse files Browse the repository at this point in the history
formulary: load from API for formula renames
  • Loading branch information
MikeMcQuaid authored Oct 12, 2023
2 parents 5e78ba3 + 408e15f commit 41dc533
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Library/Homebrew/formulary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def self.load_formula_from_api(name, flags:)

class_name = class_s(name)
json_formula = Homebrew::API::Formula.all_formulae[name]
raise FormulaUnavailableError, name if json_formula.nil?

json_formula = Homebrew::API.merge_variations(json_formula)

uses_from_macos_names = json_formula["uses_from_macos"].map do |dep|
Expand Down Expand Up @@ -970,6 +972,10 @@ def self.loader_for(ref, from: nil, warn: true)
end

if CoreTap.instance.formula_renames.key?(ref)
unless Homebrew::EnvConfig.no_install_from_api?
return FormulaAPILoader.new(CoreTap.instance.formula_renames[ref])
end

return TapLoader.new("#{CoreTap.instance}/#{ref}", from: from, warn: warn)
end

Expand Down

0 comments on commit 41dc533

Please sign in to comment.