conjure icon indicating copy to clipboard operation
conjure copied to clipboard

CLI: improve default output

Open nmiyake opened this issue 7 years ago • 2 comments

Invoking the CLI with no arguments results in a stack trace:

➜  bin ./conjure       
Exception in thread "main" java.lang.IllegalArgumentException: Usage: conjure compile <target> <output>
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:134)
	at com.palantir.conjure.cli.ConjureCli.parseCliConfiguration(ConjureCli.java:51)
	at com.palantir.conjure.cli.ConjureCli.main(ConjureCli.java:40)

This output is not very friendly from a usability perspective -- would be nicer if this output was just the error message ("Usage: conjure compile ") and didn't include the stack trace.

nmiyake avatar Aug 16 '18 22:08 nmiyake

Agreed this should be improved!

ferozco avatar Aug 17 '18 13:08 ferozco

As part of this, the default output should likely include help -- for example, would have been nice to know things like the fact that <target> can be a file or a directory while <output> must be a path to a file (cannot be a directory)

nmiyake avatar Aug 17 '18 17:08 nmiyake