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
|
rescue NoSuchKegError, FormulaUnavailableError => e
|
||||||
if load_from_json && ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed? &&
|
if load_from_json && ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed? &&
|
||||||
Utils::BottleAPI.bottle_available?(name)
|
Utils::BottleAPI.bottle_available?(name)
|
||||||
Utils::BottleAPI.download_bottles(name)
|
Utils::BottleAPI.fetch_bottles(name)
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ module Homebrew
|
|||||||
next if formula.tap.present? && !formula.tap.installed?
|
next if formula.tap.present? && !formula.tap.installed?
|
||||||
next unless Utils::BottleAPI.bottle_available?(name)
|
next unless Utils::BottleAPI.bottle_available?(name)
|
||||||
|
|
||||||
Utils::BottleAPI.download_bottles(name)
|
Utils::BottleAPI.fetch_bottles(name)
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|||||||
@ -164,15 +164,13 @@ module Homebrew
|
|||||||
next formula if formula.tap.present? && formula.tap.installed?
|
next formula if formula.tap.present? && formula.tap.installed?
|
||||||
next formula unless Utils::BottleAPI.bottle_available?(formula.name)
|
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)
|
Formulary.factory(formula.name)
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
formula
|
formula
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opoo formulae_to_install
|
|
||||||
|
|
||||||
if formulae_to_install.empty?
|
if formulae_to_install.empty?
|
||||||
oh1 "No packages to upgrade"
|
oh1 "No packages to upgrade"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -19,7 +19,7 @@ module Utils
|
|||||||
end.freeze
|
end.freeze
|
||||||
|
|
||||||
FORMULAE_BREW_SH_VERSIONS_API_URL = if OS.mac?
|
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
|
else
|
||||||
"https://formulae.brew.sh/api/versions-linux.json"
|
"https://formulae.brew.sh/api/versions-linux.json"
|
||||||
end.freeze
|
end.freeze
|
||||||
@ -58,11 +58,11 @@ module Utils
|
|||||||
end
|
end
|
||||||
|
|
||||||
sig { params(name: String).void }
|
sig { params(name: String).void }
|
||||||
def download_bottles(name)
|
def fetch_bottles(name)
|
||||||
hash = fetch(name)
|
hash = fetch(name)
|
||||||
bottle_tag = Utils::Bottles.tag.to_s
|
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)
|
download_bottle(hash, bottle_tag)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user