diff --git a/Library/Homebrew/bottle_api.rb b/Library/Homebrew/bottle_api.rb index 1f0d1120cd..ef48eaaecd 100644 --- a/Library/Homebrew/bottle_api.rb +++ b/Library/Homebrew/bottle_api.rb @@ -74,6 +74,7 @@ module BottleAPI existing_formula = begin Formulary.factory dep_hash["name"] rescue FormulaUnavailableError + # The formula might not exist if it's not installed and homebrew/core isn't tapped nil end diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 16922e2c75..bcbe7b0e65 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -244,11 +244,8 @@ module Homebrew specs = [] if (stable = f.stable) - latest_version = if ENV["HOMEBREW_JSON_CORE"].present? - BottleAPI.latest_pkg_version(f.name).version || stable.version - else - stable.version - end + latest_version = BottleAPI.latest_pkg_version(f.name).version if ENV["HOMEBREW_JSON_CORE"].present? + latest_version ||= stable.version s = "stable #{latest_version}" s += " (bottled)" if stable.bottled? && f.pour_bottle?