-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters