cmd/info: only display keg info if tap matches

Fixes #19294.
This commit is contained in:
Ruoyu Zhong 2025-02-13 01:39:21 +08:00
parent c949f9f719
commit 7aa1725aff
No known key found for this signature in database

View File

@ -298,7 +298,7 @@ module Homebrew
kegs = [ kegs = [
*heads.sort_by { |keg| -keg.tab.time.to_i }, *heads.sort_by { |keg| -keg.tab.time.to_i },
*versioned.sort_by(&:scheme_and_version), *versioned.sort_by(&:scheme_and_version),
] ].select { |keg| keg.tab.tap == formula.tap }
if kegs.empty? if kegs.empty?
puts "Not installed" puts "Not installed"
if (bottle = formula.bottle) if (bottle = formula.bottle)