From 3d970a2b9b735217460386329a6f966867dcf733 Mon Sep 17 00:00:00 2001 From: maishivamhoo123 Date: Sat, 7 Feb 2026 11:54:45 +0530 Subject: [PATCH 1/2] fix(progress): restore TTY output on Windows consoles Signed-off-by: maishivamhoo123 --- pkg/compose/build_bake.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/compose/build_bake.go b/pkg/compose/build_bake.go index 90bd0d5a35..c0850d1720 100644 --- a/pkg/compose/build_bake.go +++ b/pkg/compose/build_bake.go @@ -435,9 +435,6 @@ func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) { // buildkit's NewDisplay doesn't actually require a [io.Reader], it only uses the [containerd.Console] type to // benefits from ANSI capabilities, but only does writes. func makeConsole(out io.Writer) io.Writer { - if s, ok := out.(*streams.Out); ok { - return &_console{s} - } return out } From 9d53f928382329d1a455444f34140977bd5b9da7 Mon Sep 17 00:00:00 2001 From: maishivamhoo123 Date: Sat, 7 Feb 2026 19:32:54 +0530 Subject: [PATCH 2/2] Fix(progress): implement Fd() in console wrapper to restore Windows TTY Signed-off-by: maishivamhoo123 --- pkg/compose/build_bake.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkg/compose/build_bake.go b/pkg/compose/build_bake.go index c0850d1720..a828172673 100644 --- a/pkg/compose/build_bake.go +++ b/pkg/compose/build_bake.go @@ -435,6 +435,9 @@ func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) { // buildkit's NewDisplay doesn't actually require a [io.Reader], it only uses the [containerd.Console] type to // benefits from ANSI capabilities, but only does writes. func makeConsole(out io.Writer) io.Writer { + if s, ok := out.(*streams.Out); ok { + return &_console{s} + } return out } @@ -444,21 +447,25 @@ type _console struct { *streams.Out } -func (c _console) Read(p []byte) (n int, err error) { +func (c *_console) Read(p []byte) (n int, err error) { return 0, errors.New("not implemented") } -func (c _console) Close() error { +func (c *_console) Close() error { return nil } -func (c _console) Fd() uintptr { +func (c *_console) Fd() uintptr { return c.FD() } -func (c _console) Name() string { +func (c *_console) Name() string { return "compose" } +func (c *_console) File() *os.File { + // streams.Out wraps the actual file. We attempt to unwrap it. + return os.NewFile(c.Out.FD(), "compose") +} func toBakeExtraHosts(hosts types.HostsList) map[string]string { m := make(map[string]string)