Merge pull request #8236 from MikeMcQuaid/tap-info-comma

cmd/tap-info: improve comma usage.
This commit is contained in:
Mike McQuaid 2020-08-06 14:37:30 +01:00 committed by GitHub
commit 5c5607271c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,14 +69,14 @@ module Homebrew
puts unless i.zero?
info = "#{tap}: "
if tap.installed?
info += ", private" if tap.private?
info += if (contents = tap.contents).empty?
", no commands/casks/formulae"
info += if (contents = tap.contents).blank?
"no commands/casks/formulae"
else
", #{contents.join(", ")}"
contents.join(", ")
end
info += ", private" if tap.private?
info += "\n#{tap.path} (#{tap.path.abv})"
info += "\nFrom: #{tap.remote.nil? ? "N/A" : tap.remote}"
info += "\nFrom: #{tap.remote.blank? ? "N/A" : tap.remote}"
else
info += "Not installed"
end