Merge pull request #17076 from willfaught/master

cmd, cask: info prints whether installed
This commit is contained in:
Mike McQuaid 2024-04-12 18:02:27 +01:00 committed by GitHub
commit 4861c6fff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -48,7 +48,7 @@ module Cask
Formatter.error("does not exist")
end
"#{versioned_staged_path} (#{path_details})\n"
"Installed\n#{versioned_staged_path} (#{path_details})\n"
end
def self.name_info(cask)

View File

@ -301,6 +301,7 @@ module Homebrew
if kegs.empty?
puts "Not installed"
else
puts "Installed"
kegs.each do |keg|
puts "#{keg} (#{keg.abv})#{" *" if keg.linked?}"
tab = Tab.for_keg(keg).to_s

View File

@ -64,12 +64,13 @@ module Homebrew
puts unless i.zero?
info = "#{tap}: "
if tap.installed?
info += "Installed"
info += if (contents = tap.contents).blank?
"no commands/casks/formulae"
"\nNo commands/casks/formulae"
else
contents.join(", ")
"\n#{contents.join(", ")}"
end
info += ", private" if tap.private?
info += "\nPrivate" if tap.private?
info += "\n#{tap.path} (#{tap.path.abv})"
info += "\nFrom: #{tap.remote.presence || "N/A"}"
else