dhall-lang / dhall-json

This repository has moved to https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-json
BSD 3-Clause "New" or "Revised" License
65 stars 6 forks source link

Don't print `ExitSuccess` when using `--help` #26

Closed Gabriella439 closed 6 years ago

Gabriella439 commented 6 years ago

This fixes the command-line programs to not print ExitSuccess when provided with the --help flag

The root cause of this message is that optparse-applicative throws ExitSuccess in order to short-circuit the program when the user provides the --help flag and the handle function prints all exceptions that bubble through it. This change relocates the handle function to wrap everything except option parsing.