cli/named_args: update package_conflicts_message

Let's also show users the right way to silence this message.

Follow-up to #18330.
This commit is contained in:
Carlo Cabrera 2024-09-17 00:23:15 +08:00
parent 8fd78bffce
commit 2101411c0a
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -492,13 +492,13 @@ module Homebrew
if package.is_a?(Formula) && (tap = package.tap) if package.is_a?(Formula) && (tap = package.tap)
message += "use #{tap.name}/#{package.name} or " message += "use #{tap.name}/#{package.name} or "
end end
message += "specify the `--formula` flag." message += "specify the `--formula` flag. To silence this message, use the `--cask` flag."
when Cask::Cask when Cask::Cask
message += " For the cask, " message += " For the cask, "
if (tap = package.tap) if (tap = package.tap)
message += "use #{tap.name}/#{package.token} or " message += "use #{tap.name}/#{package.token} or "
end end
message += "specify the `--cask` flag." message += "specify the `--cask` flag. To silence this message, use the `--formula` flag."
end end
message.freeze message.freeze
end end