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

feat: do not print errors returned from yargs #300

Merged
merged 1 commit into from
Sep 8, 2021
Merged

feat: do not print errors returned from yargs #300

merged 1 commit into from
Sep 8, 2021

Conversation

hongaar
Copy link
Owner

@hongaar hongaar commented Sep 8, 2021

This PR removes the console.error which would print errors returned from yargs. It was expected only validation errors would be returned, but it turns out any thrown error from command handlers is returned as the err parameter in the parse callback function.

Also adds an example to the readme to explain error handling better.

Fixes #284

@hongaar hongaar merged commit 90712a9 into main Sep 8, 2021
@hongaar hongaar deleted the fix/284 branch September 8, 2021 10:56
github-actions bot pushed a commit that referenced this pull request Sep 8, 2021
# [1.8.0](v1.7.2...v1.8.0) (2021-09-08)

### Features

* do not print errors returned from yargs ([#300](#300)) ([90712a9](90712a9))

[skip ci]
@hongaar
Copy link
Owner Author

hongaar commented Sep 8, 2021

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors are printed to stdout even with a custom error handler
1 participant