From 24a78adf1063653adc80187139e01233fdb3d5b1 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 23 Sep 2019 17:47:36 +0200 Subject: [PATCH] redis-cli: AUTH can now have 3 arguments as well. --- src/redis-cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 9a5f81723..38a0b0b7f 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1222,7 +1222,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) { if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) { config.dbnum = atoi(argv[1]); cliRefreshPrompt(); - } else if (!strcasecmp(command,"auth") && argc == 2) { + } else if (!strcasecmp(command,"auth") && (argc == 2 || argc == 3)) + { cliSelect(); } }