Fix tests
This commit is contained in:
parent
36dd69dd60
commit
ca5f6026ed
@ -100,7 +100,7 @@ module Homebrew
|
|||||||
elsif f.tap.present?
|
elsif f.tap.present?
|
||||||
f.pkg_version.to_s
|
f.pkg_version.to_s
|
||||||
else
|
else
|
||||||
Utils::BottleAPI.latest_pkg_version(f.name).to_s
|
Utils::BottleAPI.latest_pkg_version(f.name)&.to_s || f.pkg_version.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
outdated_versions = outdated_kegs.group_by { |keg| Formulary.from_keg(keg).full_name }
|
outdated_versions = outdated_kegs.group_by { |keg| Formulary.from_keg(keg).full_name }
|
||||||
|
|||||||
@ -88,7 +88,7 @@ module Homebrew
|
|||||||
args.named.each do |name|
|
args.named.each do |name|
|
||||||
formula = Formulary.factory(name)
|
formula = Formulary.factory(name)
|
||||||
next unless formula.any_version_installed?
|
next unless formula.any_version_installed?
|
||||||
next if formula.tap.present? && !formula.tap.installed?
|
next if formula.tap.present?
|
||||||
next unless Utils::BottleAPI.bottle_available?(name)
|
next unless Utils::BottleAPI.bottle_available?(name)
|
||||||
|
|
||||||
Utils::BottleAPI.fetch_bottles(name)
|
Utils::BottleAPI.fetch_bottles(name)
|
||||||
|
|||||||
@ -161,7 +161,7 @@ module Homebrew
|
|||||||
|
|
||||||
if ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed?
|
if ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed?
|
||||||
formulae_to_install.map! do |formula|
|
formulae_to_install.map! do |formula|
|
||||||
next formula if formula.tap.present? && formula.tap.installed?
|
next formula if formula.tap.present?
|
||||||
next formula unless Utils::BottleAPI.bottle_available?(formula.name)
|
next formula unless Utils::BottleAPI.bottle_available?(formula.name)
|
||||||
|
|
||||||
Utils::BottleAPI.fetch_bottles(formula.name)
|
Utils::BottleAPI.fetch_bottles(formula.name)
|
||||||
|
|||||||
@ -1328,7 +1328,7 @@ class Formula
|
|||||||
latest_version = if tap.present?
|
latest_version = if tap.present?
|
||||||
pkg_version
|
pkg_version
|
||||||
else
|
else
|
||||||
Utils::BottleAPI.latest_pkg_version name
|
Utils::BottleAPI.latest_pkg_version(name) || pkg_version
|
||||||
end
|
end
|
||||||
|
|
||||||
installed_kegs.each do |keg|
|
installed_kegs.each do |keg|
|
||||||
|
|||||||
@ -46,6 +46,9 @@ module Utils
|
|||||||
output = Utils::Curl.curl_output("--fail", FORMULAE_BREW_SH_VERSIONS_API_URL)
|
output = Utils::Curl.curl_output("--fail", FORMULAE_BREW_SH_VERSIONS_API_URL)
|
||||||
JSON.parse(output.stdout)
|
JSON.parse(output.stdout)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return unless @formula_versions.key? name
|
||||||
|
|
||||||
PkgVersion.new(@formula_versions[name]["version"], @formula_versions[name]["revision"])
|
PkgVersion.new(@formula_versions[name]["version"], @formula_versions[name]["revision"])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user