diff options
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java index 59ec2f785..43a58c85c 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/authenticator/AuthenticatorAddCLI.java @@ -22,6 +22,7 @@ import java.io.BufferedReader; import java.io.FileReader; import java.io.PrintWriter; import java.io.StringWriter; +import java.util.Arrays; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; @@ -48,6 +49,13 @@ public class AuthenticatorAddCLI extends CLI { public void execute(String[] args) throws Exception { + // Check for "--help" prior to parsing due to required option + if (Arrays.asList(args).contains("--help")) { + // Display usage + printHelp(); + System.exit(0); + } + Option option = new Option(null, "input", true, "Input file containing authenticator properties."); option.setArgName("file"); option.setRequired(true); |