Currently
Babashka cli generates the following error when an option value is missing:
(require '[babashka.cli :as cli])
(cli/parse-opts ["--foo"] {:spec {:foo {:coerce :string}}})
;; => Execution error (ExceptionInfo) at babashka.cli/parse-opts$fn (cli.cljc:331).
;; Coerce failure: cannot transform (implicit) true to string
Perhaps we can do better?
On other projects, I've detected this error and presented it to the user as:
Option specified without value
I think this is more user-friendly.
Next
If you think this is viable and worth pursuing, I am happy to flesh out the idea with changes/tests, and if all is good, a PR.