Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose val command: Command[IO[ExitCode]] in CommandIOApp #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 29, 2024

  1. Expose command: Command in CommandIOApp

    If you want to show the help when handling errors in the `IO` part of
    the app, you need to call `.showHelp` on the command instance.
    This is not possible with `CommandIOApp` since it doesn't expose the
    app but creates and uses it on the fly.
    This PR adds a `val command: Command[IO[ExitCode]]` to `CommandIOApp`
    so you can have similar errors to the errors printed by `validate` but
    when handling IO errors in the app with `.handleErrorWith` in the
    application logic
    lolgab committed May 29, 2024
    Configuration menu
    Copy the full SHA
    06578d6 View commit details
    Browse the repository at this point in the history