Merge pull request #206 from rabbitmq/rabbitmq-cli-205

Supress banner for machine readable formats
This commit is contained in:
Michael Klishin 2017-07-14 18:36:39 +03:00 committed by GitHub
commit e37179830b
1 changed files with 8 additions and 1 deletions

View File

@ -209,10 +209,17 @@ defmodule RabbitMQCtl do
end
end
## Suppress banner if --quiet option is provided
# Suppress banner if --quiet option is provided
defp maybe_print_banner(_, _, %{quiet: true}) do
nil
end
# Suppress banner if a machine-readable formatter is used
defp maybe_print_banner(_, _, %{formatter: "csv"}) do
nil
end
defp maybe_print_banner(_, _, %{formatter: "json"}) do
nil
end
defp maybe_print_banner(command, args, opts) do
case command.banner(args, opts) do
nil -> nil