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

Overriding exit handling still messages to console #1241

Closed
sseaman opened this issue Apr 9, 2020 · 3 comments
Closed

Overriding exit handling still messages to console #1241

sseaman opened this issue Apr 9, 2020 · 3 comments

Comments

@sseaman
Copy link

sseaman commented Apr 9, 2020

If you override the exit handling via program.exitOverride() you still get console messages due to all the console.log()s starting at line https://github.com/tj/commander.js/blob/master/index.js#L1097.

@shadowspawn
Copy link
Collaborator

shadowspawn commented Apr 9, 2020

Yes, .exitOverride() allows you to override just the exit part of the handling, and does not give you full control over the error handling.

This is mentioned in the README:

The normal display of error messages or version or help is not affected by the override which is called after the display.

https://github.com/tj/commander.js#override-exit-handling

@shadowspawn
Copy link
Collaborator

An answer was provided, and no further activity in a month. Closing this as resolved.

Feel free to open a new issue if it comes up again, with new information and renewed interest.

@shadowspawn shadowspawn mentioned this issue Oct 31, 2020
5 tasks
@shadowspawn
Copy link
Collaborator

Adding support for overriding messages to console in #1387

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

No branches or pull requests

2 participants