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

fix: don't print to stdout when initializing console fails on Windows #66

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

muesli
Copy link
Contributor

@muesli muesli commented Oct 21, 2022

When stdin/err/out are redirected, console mode can't be changed. That's often expected & acceptable however, so we shouldn't print errors to stdout.

@kzys
Copy link
Member

kzys commented Mar 7, 2023

@kevpar @dcantah PTAL

console_windows.go Outdated Show resolved Hide resolved
Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

I'd prefer to get rid of the branches/commented out errors with a little note that we can explore handling redirected io via the conout/in shenanigans, but LGTM!

When stdin/err/out are redirected, console mode can't be changed.
That's often expected & acceptable however, so we shouldn't print
errors to stdout.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
@muesli
Copy link
Contributor Author

muesli commented Mar 10, 2023

I'd prefer to get rid of the branches/commented out errors with a little note that we can explore handling redirected io via the conout/in shenanigans, but LGTM!

Done. PTAL!

Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

LGTM again. @kzys PTAL/merge if you're alright with this, thanks @muesli

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

Successfully merging this pull request may close these issues.

5 participants