Hi all,
I've found an issue with the Whisker CLI command line parsing logic,
which the diff below resolves. Basically, as it stands in trunk
today, the CLI is only able to run the help function, since the parse
method isn't being provided the full list of possible options.
We're trying to setup Whisker for the CloudStack project, and I was
hoping to use the CLI for development of the required metadata files.
Is there a specific method you would like me to follow to get this fix
(or something more appropriate) into the codebase?
-chip
Index: apache-whisker-cli/src/main/java/org/apache/creadur/whisker/cli/Main.java
===================================================================
--- apache-whisker-cli/src/main/java/org/apache/creadur/whisker/cli/Main.java
(revision
1373827)
+++ apache-whisker-cli/src/main/java/org/apache/creadur/whisker/cli/Main.java
(working
copy)
@@ -188,9 +188,13 @@
*/
private boolean printHelp(String[] args) throws ParseException {
final CommandLineOption help = CommandLineOption.PRINT_HELP;
- return help.isSetOn(
- parser().parse(new Options().addOption(
- help.create()), args));
+ try {
+ return help.isSetOn(
+ parser().parse(new Options().addOption(
+ help.create()), args));
+ } catch (ParseException e) {
+ return false;
+ }
}
/**