Welcome! Please see the About page for a little more info on how this works.

+3 votes
in Clojure CLI by
retagged by

When clj or clojure is run with unknown argument (e.g. -v or -p) it will report this:

Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-p (No such file or directory)

Full report at:
/tmp/clojure-814615935521714016.edn

Instead of throwing a confusing exception and stacktrace, it should report that command line argument is wrong and user should run --help for more options. Example of grep:

$ grep --xxx
grep: unrecognized option '--xxx'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

Example of leiningen:

$ lein -xxx
'-xxx' is not a task. See 'lein help'.

1 Answer

+2 votes
by
selected by
...