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

Output usage errors to ErrWriter #1758

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Conversation

kke
Copy link
Contributor

@kke kke commented Jun 15, 2023

What type of PR is this?

  • bug

What this PR does / why we need it:

Usage errors were being output to stdout (command.Writer) instead of stderr (command.ErrWriter).

Which issue(s) this PR fixes:

Release Notes

(REQUIRED)

Usage errors now go to the stderr stream. To capture them, use `command 2>&1 > foo.txt`.
If you have used something like `Writer: io.Discard` to suppress errors, you now need to suppress
them also for `ErrWriter`.

kke added 2 commits June 15, 2023 13:56
Signed-off-by: Kimmo Lehto <kimmo.lehto@gmail.com>
Signed-off-by: Kimmo Lehto <kimmo.lehto@gmail.com>
@kke kke marked this pull request as ready for review June 15, 2023 11:29
@kke kke requested a review from a team as a code owner June 15, 2023 11:29
Copy link
Member

@meatballhat meatballhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@meatballhat meatballhat merged commit d74001a into urfave:main Jun 15, 2023
@kke kke deleted the errwriter-for-errors branch June 15, 2023 12:29
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

Successfully merging this pull request may close these issues.

2 participants