Skip to content

CommandsApp exit code 0 when parsing fails #404

Description

@daddykotex

Thanks for decline, it's truly amazing.

We use it as part of a few of our applications and I just realized that when using CommandApp, if the parsing fails, we print the help but still return 0 as the exit code. See https://github.com/bkirwi/decline/blob/master/core/shared/src/main/scala/com/monovore/decline/CommandApp.scala#L53

We had not realized before today because the CommandIOApp returns a different exit code when parsing fails: https://github.com/bkirwi/decline/blob/master/effect/shared/src/main/scala/com/monovore/decline/effect/CommandIOApp.scala#L42

Would you be open to a PR to do sys.exit(1) instead?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions