Rename download_bottles to fetch_bottles
This commit is contained in:
parent
22f986b89a
commit
36dd69dd60
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user