diff --git a/pkg/compose/build_bake.go b/pkg/compose/build_bake.go index 90bd0d5a35..a828172673 100644 --- a/pkg/compose/build_bake.go +++ b/pkg/compose/build_bake.go @@ -447,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)