l3nz / cli-matic

Compact, hands-free [sub]command line parsing library for Clojure.
Eclipse Public License 2.0
361 stars 29 forks source link

Have double :short option. #18

Closed l3nz closed 6 years ago

l3nz commented 6 years ago

We should get a better message out.

Exception in thread "main" java.lang.AssertionError: Assert failed: (distinct?* (remove nil? (map :short-opt %)))
    at clojure.tools.cli$compile_option_specs.invokeStatic(cli.clj:265)
    at clojure.tools.cli$compile_option_specs.invoke(cli.clj:265)
    at clojure.tools.cli$parse_opts.invokeStatic(cli.clj:593)
    at clojure.tools.cli$parse_opts.doInvoke(cli.clj:471)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at cli_matic.core$parse_cmds.invokeStatic(core.clj:417)
    at cli_matic.core$parse_cmds.invoke(core.clj:372)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.AFn.applyTo(AFn.java:144)
    at orchestra.spec.test$spec_checking_fn$fn__727.doInvoke(test.clj:123)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at cli_matic.core$run_cmd_STAR_.invokeStatic(core.clj:521)
    at cli_matic.core$run_cmd_STAR_.invoke(core.clj:519)
    at cli_matic.core$run_cmd.invokeStatic(core.clj:543)
    at cli_matic.core$run_cmd.invoke(core.clj:535)
l3nz commented 6 years ago

In this case the same :short option was present twice.