mirror of https://mirror.osredm.com/root/redis.git
Fix XINFO help for unexpected options. (#9075)
Small cleanup and consistency.
This commit is contained in:
parent
096c5fd5d2
commit
b109977301
|
@ -3459,6 +3459,11 @@ void xinfoCommand(client *c) {
|
|||
|
||||
/* HELP is special. Handle it ASAP. */
|
||||
if (!strcasecmp(c->argv[1]->ptr,"HELP")) {
|
||||
if (c->argc != 2) {
|
||||
addReplySubcommandSyntaxError(c);
|
||||
return;
|
||||
}
|
||||
|
||||
const char *help[] = {
|
||||
"CONSUMERS <key> <groupname>",
|
||||
" Show consumers of <groupname>.",
|
||||
|
|
|
@ -714,4 +714,9 @@ start_server {tags {"stream"}} {
|
|||
catch {r XGROUP help xxx} e
|
||||
assert_match "*Unknown subcommand or wrong number of arguments*" $e
|
||||
}
|
||||
|
||||
test {XINFO HELP should not have unexpected options} {
|
||||
catch {r XINFO help xxx} e
|
||||
assert_match "*Unknown subcommand or wrong number of arguments*" $e
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue