redis-cli: AUTH can now have 3 arguments as well.

This commit is contained in:
antirez 2019-09-23 17:47:36 +02:00
parent cd446eb161
commit 24a78adf10

View File

@ -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) { if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) {
config.dbnum = atoi(argv[1]); config.dbnum = atoi(argv[1]);
cliRefreshPrompt(); cliRefreshPrompt();
} else if (!strcasecmp(command,"auth") && argc == 2) { } else if (!strcasecmp(command,"auth") && (argc == 2 || argc == 3))
{
cliSelect(); cliSelect();
} }
} }