Issue 47 in tranche: Command line tool argument parsing seems broken

6 views
Skip to first unread message

tra...@googlecode.com

unread,
Aug 23, 2012, 8:08:29 AM8/23/12
to tranche-d...@googlegroups.com
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?

Reply all
Reply to author
Forward
0 new messages