Skip to content

fix(build): TTY progress on Windows — hand the real stdout to buildkit - #14090

Merged
ndeloof merged 1 commit into
mainfrom
fix-windows-tty-progress
Aug 19, 2026
Merged

fix(build): TTY progress on Windows — hand the real stdout to buildkit#14090
ndeloof merged 1 commit into
mainfrom
fix-windows-tty-progress

Conversation

@ndeloof

@ndeloof ndeloof commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #14086: TTY/colorized build progress was structurally broken on Windows.

The bake display goes through containerd/console, whose Windows newMaster only accepts the exact os.Stdin/Stdout/Stderr values — a pointer-identity check, not a capability probe. The _console wrapper added to satisfy buildkit's console.File type-assert could therefore never pass it: --progress=auto silently fell back to plain, and --progress=tty / --ansi always failed with failed to get console: creating a console from a file is not supported on windows.

The fix hands the genuine *os.File (via streams.Out.File()) to progressui.NewDisplay when 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

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>
@ndeloof
ndeloof requested review from a team as code owners August 19, 2026 08:05
@ndeloof
ndeloof requested a review from glours August 19, 2026 08:05
@glours
glours enabled auto-merge (rebase) August 19, 2026 08:14
@ndeloof
ndeloof disabled auto-merge August 19, 2026 15:42
@ndeloof
ndeloof merged commit 9a70c81 into main Aug 19, 2026
83 of 93 checks passed
@ndeloof
ndeloof deleted the fix-windows-tty-progress branch August 19, 2026 16:06
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.

[BUG] TTY/colorized progress broken on Windows (even with forcing regardless of the shell e.g. pwsh or cmd)

2 participants