diff options
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java b/base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java index 7f615eb03..0459fa759 100644 --- a/base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/key/KeyRequestShowCLI.java @@ -18,6 +18,8 @@ package com.netscape.cmstools.key; +import java.util.Arrays; + import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.ParseException; @@ -40,6 +42,13 @@ public class KeyRequestShowCLI extends CLI { public void execute(String[] args) { + // Check for "--help" + if (Arrays.asList(args).contains("--help")) { + // Display usage + printHelp(); + System.exit(0); + } + if (args.length != 1) { printHelp(); System.exit(-1); @@ -53,10 +62,6 @@ public class KeyRequestShowCLI extends CLI { printHelp(); System.exit(1); } - if (cmd.hasOption("help")) { - printHelp(); - System.exit(1); - } RequestId requestId = new RequestId(args[0].trim()); |