-
Notifications
You must be signed in to change notification settings - Fork 991
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
Errors are printed twice if exitProcess is false #270
Comments
@tepez Thanks! Looks like Just to be clear, the help content (if I think your proposed solution is a good one, but I'm going to investigate other options for sake of due diligence. I'll report back with any findings/ideas. |
Thanks @nexdrew. I'll wait. There is another issue with If it was thrown by yargs - it was already printed so there is no need to print it again. |
I do agree we should fix this problem, but note that a possible workaround would be to use your own failure handler via |
Great idea @nexdrew ! yargs.fail((msg) ->
throw new Error(msg)
) |
@tepez Great, glad I could help! As far as potential solutions to this problem goes, here's what I have so far:
Thoughts? |
For the first potential solution mentioned above, see PR #273. |
LGTM |
When exitProcess is false, errors are outputted twice.
See failing spec in: #269
An error is first outputted here.
It's then thrown a few lines below.
It will then be caught and outputted again here.
I think a simple solution would be to create something like a
ParseError
type. When we catch an error of this type up the stack - we don't print it again.Will you accept a PR?
The text was updated successfully, but these errors were encountered: