Skip to content

Add :required for :flags#6

Merged
plexus merged 2 commits into
lambdaisland:mainfrom
gabriel376:gabriel376/issue-4
Apr 19, 2024
Merged

Add :required for :flags#6
plexus merged 2 commits into
lambdaisland:mainfrom
gabriel376:gabriel376/issue-4

Conversation

@gabriel376
Copy link
Copy Markdown
Contributor

Solves #4

Notes

  • Make (parse-error!) thrown an Exception rather than calling (System/exit), so tests can be executed and checked against it
  • Split the main dispatch function into (dispatch*) and (dispatch): the former contains the actual logic and the latter handles exceptions
  • Fixes a small duplicated blank space when printing Unknown flag:
  • In case of an Exception is caught, make (dispatch) print FATAL messages to stderr
  • Add tests

@plexus
Copy link
Copy Markdown
Member

plexus commented Apr 19, 2024

Why did you get rid of the original tests? Were they failing?

@plexus plexus merged commit 69ac086 into lambdaisland:main Apr 19, 2024
@plexus
Copy link
Copy Markdown
Member

plexus commented May 24, 2024

Released in v0.8.39

[com.lambdaisland/cli "0.8.39"]                 ;; deps.edn
{com.lambdaisland/cli {:mvn/version "0.8.39"}}  ;; project.clj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants