Improvements based on code review
This commit is contained in:
parent
c5df900936
commit
3e01e02a02
@ -74,6 +74,7 @@ module BottleAPI
|
|||||||
existing_formula = begin
|
existing_formula = begin
|
||||||
Formulary.factory dep_hash["name"]
|
Formulary.factory dep_hash["name"]
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
|
# The formula might not exist if it's not installed and homebrew/core isn't tapped
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -244,11 +244,8 @@ module Homebrew
|
|||||||
specs = []
|
specs = []
|
||||||
|
|
||||||
if (stable = f.stable)
|
if (stable = f.stable)
|
||||||
latest_version = if ENV["HOMEBREW_JSON_CORE"].present?
|
latest_version = BottleAPI.latest_pkg_version(f.name).version if ENV["HOMEBREW_JSON_CORE"].present?
|
||||||
BottleAPI.latest_pkg_version(f.name).version || stable.version
|
latest_version ||= stable.version
|
||||||
else
|
|
||||||
stable.version
|
|
||||||
end
|
|
||||||
|
|
||||||
s = "stable #{latest_version}"
|
s = "stable #{latest_version}"
|
||||||
s += " (bottled)" if stable.bottled? && f.pour_bottle?
|
s += " (bottled)" if stable.bottled? && f.pour_bottle?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user