diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb index 71ff3306c4..3160fb2252 100644 --- a/Library/Homebrew/cli/named_args.rb +++ b/Library/Homebrew/cli/named_args.rb @@ -125,7 +125,7 @@ module Homebrew rescue NoSuchKegError, FormulaUnavailableError => e if load_from_json && ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed? && Utils::BottleAPI.bottle_available?(name) - Utils::BottleAPI.download_bottles(name) + Utils::BottleAPI.fetch_bottles(name) retry end diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 1bfec15091..e03d522e1d 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -91,7 +91,7 @@ module Homebrew next if formula.tap.present? && !formula.tap.installed? next unless Utils::BottleAPI.bottle_available?(name) - Utils::BottleAPI.download_bottles(name) + Utils::BottleAPI.fetch_bottles(name) rescue FormulaUnavailableError next end diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 8f5e8ab71e..64c06aedd5 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -164,15 +164,13 @@ module Homebrew next formula if formula.tap.present? && formula.tap.installed? next formula unless Utils::BottleAPI.bottle_available?(formula.name) - Utils::BottleAPI.download_bottles(formula.name) + Utils::BottleAPI.fetch_bottles(formula.name) Formulary.factory(formula.name) rescue FormulaUnavailableError formula end end - opoo formulae_to_install - if formulae_to_install.empty? oh1 "No packages to upgrade" else diff --git a/Library/Homebrew/utils/bottle_api.rb b/Library/Homebrew/utils/bottle_api.rb index 0df65cba62..3d42ac083d 100644 --- a/Library/Homebrew/utils/bottle_api.rb +++ b/Library/Homebrew/utils/bottle_api.rb @@ -19,7 +19,7 @@ module Utils end.freeze FORMULAE_BREW_SH_VERSIONS_API_URL = if OS.mac? - "https://formulae.brew.sh/api/versions.json" + "https://formulae.brew.sh/api/versions-formulae.json" else "https://formulae.brew.sh/api/versions-linux.json" end.freeze @@ -58,11 +58,11 @@ module Utils end sig { params(name: String).void } - def download_bottles(name) + def fetch_bottles(name) hash = fetch(name) bottle_tag = Utils::Bottles.tag.to_s - odie "No bottle availabe for current OS" unless hash["bottles"].key? bottle_tag + odie "No bottle available for current OS" unless hash["bottles"].key? bottle_tag download_bottle(hash, bottle_tag)