fix(build): TTY progress on Windows — hand the real stdout to buildkit - #14090
Open
ndeloof wants to merge 1 commit into
Open
fix(build): TTY progress on Windows — hand the real stdout to buildkit#14090ndeloof wants to merge 1 commit into
ndeloof wants to merge 1 commit into
Conversation
The bake progress display goes through containerd/console, which on Windows only accepts the exact os.Stdin/Stdout/Stderr values (pointer identity in newMaster) and rejects everything else with "creating a console from a file is not supported on windows". The _console wrapper introduced to satisfy buildkit's console.File type-assert therefore could never pass that check: TTY progress silently fell back to plain in auto mode, and --progress=tty / --ansi always failed hard with "failed to get console". When the CLI stream was constructed from a real file — the interactive case, where it wraps os.Stdout — hand that genuine *os.File to NewDisplay so the identity check passes. File-less streams keep the wrapper, which works on Unix where only the descriptor matters. Fixes #14086 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
glours
approved these changes
Aug 19, 2026
glours
enabled auto-merge (rebase)
August 19, 2026 08:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14086: TTY/colorized build progress was structurally broken on Windows.
The bake display goes through containerd/console, whose Windows
newMasteronly accepts the exactos.Stdin/Stdout/Stderrvalues — a pointer-identity check, not a capability probe. The_consolewrapper added to satisfy buildkit'sconsole.Filetype-assert could therefore never pass it:--progress=autosilently fell back to plain, and--progress=tty/--ansi alwaysfailed withfailed to get console: creating a console from a file is not supported on windows.The fix hands the genuine
*os.File(viastreams.Out.File()) toprogressui.NewDisplaywhen the CLI stream wraps a real file, which is the interactive case. File-less streams keep the wrapper, unchanged: TTY rendering still works on Unix there, where only the descriptor matters.🤖 Generated with Claude Code