From aa1e64ec11732255c8273c1b05dd876e93b17f8c Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 7 Feb 2019 14:34:49 +0900 Subject: [PATCH] Warn about redundant use of --compact option --- repmgr-client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/repmgr-client.c b/repmgr-client.c index 0e9ac9c1..cab21f8e 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -1889,6 +1889,22 @@ check_cli_parameters(const int action) "only one of --csv, --nagios and --optformat can be used"); } } + + /* --compact */ + + if (runtime_options.compact == TRUE) + { + switch (action) + { + case CLUSTER_SHOW: + case DAEMON_STATUS: + break; + default: + item_list_append_format(&cli_warnings, + _("--compact is not effective when executing %s"), + action_name(action)); + } + } }