Skip to content

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

Merged
estesp merged 1 commit into
containerd:mainfrom
muesli:windows-printf
Mar 13, 2023
Merged

fix: don't print to stdout when initializing console fails on Windows#66
estesp merged 1 commit into
containerd:mainfrom
muesli:windows-printf

Conversation

@muesli

Copy link
Copy Markdown
Contributor

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
kzys approved these changes Mar 7, 2023
@kzys

kzys commented Mar 7, 2023

Copy link
Copy Markdown
Member

@kevpar@dcantah PTAL

Comment threadconsole_windows.go Outdated
Comment threadconsole_windows.go

@dcantahdcantah left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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!

@dcantahdcantah left a comment

Copy link
Copy Markdown
Member

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants

@muesli@kzys@caarlos0@estesp@dcantah@dmcgowan