Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 47 by
k...@thehyve.nl: Command line tool argument parsing seems
broken
http://code.google.com/p/tranche/issues/detail?id=47
What steps will reproduce the problem?
In the latest version of the command line client (tranche-tools-b288) the
get command tries to open the first given argument as a file, despite the
help text saying it expects a hash:
$ java -jar tranche-get.jar
USAGE
[FLAGS / PARAMETERS] <HASH> <SAVE LOCATION>
$ java -jar tranche-get.jar <some-hash>
java.io.IOException: Could not open file: <some-hash>
at
org.tranche.commons.ConfigurationUtil.openStreamToFile(ConfigurationUtil.java:739)
at org.tranche.ConfigureTranche.load(ConfigureTranche.java:372)
at org.tranche.ConfigureTranche.load(ConfigureTranche.java:360)
at org.tranche.get.GetFileTool.main(GetFileTool.java:2198)
This doesn't make sense. Also, it doesn't seem to parse parameters such as
-d and -v:
$ java -jar tranche-get.jar -v <some-hash>
java.io.IOException: Could not open file: -v
at
org.tranche.commons.ConfigurationUtil.openStreamToFile(ConfigurationUtil.java:739)
at org.tranche.ConfigureTranche.load(ConfigureTranche.java:372)
at org.tranche.ConfigureTranche.load(ConfigureTranche.java:360)
at org.tranche.get.GetFileTool.main(GetFileTool.java:2198)
What are the expected command line argument s?