You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/01/20 03:10:08 UTC
[pulsar] branch master updated: Support CLI pulsar-client for
concise description. (#3381)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d94866a Support CLI pulsar-client for concise description. (#3381)
d94866a is described below
commit d94866a89dc2217fc64fd4f6f8504dc5b8e5a1c4
Author: Fangbin Sun <su...@gmail.com>
AuthorDate: Sun Jan 20 11:10:04 2019 +0800
Support CLI pulsar-client for concise description. (#3381)
### Motivation
Fixes [#3364](https://github.com/apache/pulsar/issues/3364)
### Modifications
Print corresponding usage according to the parsed command.
---
.../src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java
index 67b421a..e10caf0 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java
@@ -134,8 +134,9 @@ public class PulsarClientTool {
}
} catch (Exception e) {
System.out.println(e.getMessage());
+ String chosenCommand = commandParser.getParsedCommand();
if (e instanceof ParameterException) {
- commandParser.usage();
+ commandParser.usage(chosenCommand);
} else {
e.printStackTrace();
}