diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 951bb60a61b2b..b5a962392662e 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -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| @@ -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