You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/09 15:19:51 UTC

[GitHub] [pulsar] yuruguo commented on a diff in pull request #18832: [improve][cli] handle help flag properly

yuruguo commented on code in PR #18832:
URL: https://github.com/apache/pulsar/pull/18832#discussion_r1044559434


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java:
##########
@@ -37,12 +37,12 @@ public abstract class CmdBase {
     private PulsarAdmin admin;
     private IUsageFormatter usageFormatter;
 
-    @Parameter(names = { "-h", "--help" }, help = true, hidden = true)
-    private boolean help;
+    @Parameter(names = { "--help", "-h" }, help = true, hidden = true)
+    private boolean help = false;

Review Comment:
   Is this variable/parameter useless and can it be deleted? Because `-h` is used to print the usage of `./bin/pulsar-admin`, but it has been defined in PulsarAdminTool.RootParams
   https://github.com/apache/pulsar/blob/0d707aec92595868192380758a46f8f02886128f/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/PulsarAdminTool.java#L98-L99



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org