cmd/tap-info: improve comma usage.

Broken in https://github.com/Homebrew/brew/pull/8230.
This commit is contained in:
Mike McQuaid 2020-08-06 14:00:56 +01:00
parent a9f5925cdf
commit 99bff13cbb
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -69,14 +69,14 @@ module Homebrew
puts unless i.zero? puts unless i.zero?
info = "#{tap}: " info = "#{tap}: "
if tap.installed? if tap.installed?
info += ", private" if tap.private? info += if (contents = tap.contents).blank?
info += if (contents = tap.contents).empty? "no commands/casks/formulae"
", no commands/casks/formulae"
else else
", #{contents.join(", ")}" contents.join(", ")
end end
info += ", private" if tap.private?
info += "\n#{tap.path} (#{tap.path.abv})" 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 else
info += "Not installed" info += "Not installed"
end end