info: show accurate bottle information
This commit is contained in:
		
							parent
							
								
									3e01e02a02
								
							
						
					
					
						commit
						fb04053833
					
				@ -243,7 +243,16 @@ module Homebrew
 | 
			
		||||
  def info_formula(f, args:)
 | 
			
		||||
    specs = []
 | 
			
		||||
 | 
			
		||||
    if (stable = f.stable)
 | 
			
		||||
    if ENV["HOMEBREW_JSON_CORE"].present? && BottleAPI.bottle_available?(f.name)
 | 
			
		||||
      info = BottleAPI.fetch(f.name)
 | 
			
		||||
 | 
			
		||||
      latest_version = info["pkg_version"].split("_").first
 | 
			
		||||
      bottle_exists = info["bottles"].key?(Utils::Bottles.tag.to_s) || info["bottles"].key?("all")
 | 
			
		||||
 | 
			
		||||
      s = "stable #{latest_version}"
 | 
			
		||||
      s += " (bottled)" if bottle_exists
 | 
			
		||||
      specs << s
 | 
			
		||||
    elsif (stable = f.stable)
 | 
			
		||||
      latest_version = BottleAPI.latest_pkg_version(f.name).version if ENV["HOMEBREW_JSON_CORE"].present?
 | 
			
		||||
      latest_version ||= stable.version
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user