diff options
author | Matthew Harmsen <mharmsen@redhat.com> | 2014-04-29 19:59:32 -0700 |
---|---|---|
committer | Matthew Harmsen <mharmsen@redhat.com> | 2014-04-30 15:55:05 -0700 |
commit | 8168b0d7d8b6a2d4929d8470ff9d2845d76e724d (patch) | |
tree | 4c480de3f9beeb8e9f3f09059ecaccedd2eabd59 /base/java-tools/src | |
parent | 602ae21f6ef30ddfffeb22b743ce910b40757b3a (diff) | |
download | pki-8168b0d7d8b6a2d4929d8470ff9d2845d76e724d.tar.gz pki-8168b0d7d8b6a2d4929d8470ff9d2845d76e724d.tar.xz pki-8168b0d7d8b6a2d4929d8470ff9d2845d76e724d.zip |
Attempt to clarify pki-cert-request-review command
* PKI TRAC Ticket #585 - 'pki cert-request-review' --output creates a file
only when --action attribute is not present
Diffstat (limited to 'base/java-tools/src')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java index 4a8221bcd..4b3daf8d3 100644 --- a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java @@ -46,7 +46,9 @@ public class CertRequestReviewCLI extends CLI { option.setArgName("action"); options.addOption(option); - option = new Option(null, "file", true, "File to store the certificate request"); + option = new Option(null, "file", true, + "File to store the retrieved certificate request.\n" + + "Action will be prompted for to run against request read in from file."); option.setArgName("filename"); options.addOption(option); } @@ -86,6 +88,15 @@ public class CertRequestReviewCLI extends CLI { System.exit(-1); } + // Since "--action <action>" and "--file <filename>" are mutually + // exclusive, check to make certain that only one has been set + if (cmd.hasOption("action") && cmd.hasOption("file")) { + System.err.println("Error: The '--action <action>' and '--file <filename>' " + + "options are mutually exclusive!"); + printHelp(); + System.exit(-1); + } + String action = cmd.getOptionValue("action"); String filename = null; @@ -93,7 +104,7 @@ public class CertRequestReviewCLI extends CLI { if (cmd.hasOption("file")) { filename = cmd.getOptionValue("file"); } else { - System.err.println("Error: Missing output file name."); + System.err.println("Error: Missing '--action <action>' or '--file <filename>' option."); printHelp(); System.exit(-1); } |