dajac commented on code in PR #18031:
URL: https://github.com/apache/kafka/pull/18031#discussion_r1869564566
##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommand.java:
##########
@@ -95,7 +97,14 @@ public static void main(String[] args) {
ConsumerGroupCommandOptions opts =
ConsumerGroupCommandOptions.fromArgs(args);
try {
// should have exactly one action
- long actions = Stream.of(opts.listOpt, opts.describeOpt,
opts.deleteOpt, opts.resetOffsetsOpt,
opts.deleteOffsetsOpt).filter(opts.options::has).count();
+ long actions = Stream.of(
+ opts.listOpt,
+ opts.describeOpt,
+ opts.deleteOpt,
+ opts.resetOffsetsOpt,
+ opts.deleteOffsetsOpt,
+ opts.validateRegexOpt
+ ).filter(opts.options::has).count();
if (actions != 1)
CommandLineUtils.printUsageAndExit(opts.parser, "Command must
include exactly one action: --list, --describe, --delete, --reset-offsets,
--delete-offsets");
Review Comment:
Nice catch! I fixed it. Result:
```
Command must include exactly one action: --list, --describe, --delete,
--reset-offsets, --delete-offsets, --validate-regex
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]