From 902e82efd21d6812a00a7d785d66e497b6c89d40 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Wed, 13 May 2020 09:24:51 -0700 Subject: [PATCH] Redis-cli 6.0.1 `--cluster-yes` doesn't work (fix #7246) This make it so that all prompts for all redis-cli --cluster commands are automatically answered with a yes. --- src/redis-cli.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 880f3d70a..c8d9580c7 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1798,6 +1798,10 @@ static void usage(void) { } static int confirmWithYes(char *msg) { + if (config.cluster_manager_command.flags & CLUSTER_MANAGER_CMD_FLAG_YES) { + return 1; + } + printf("%s (type 'yes' to accept): ", msg); fflush(stdout); char buf[4]; @@ -8071,7 +8075,7 @@ int main(int argc, char **argv) { if (cliConnect(0) == REDIS_ERR) exit(1); if (config.interval == 0) config.interval = 1000000; statMode(); - } +( } /* Scan mode */ if (config.scan_mode) {