File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -435,6 +435,9 @@ func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) {
435435// buildkit's NewDisplay doesn't actually require a [io.Reader], it only uses the [containerd.Console] type to
436436// benefits from ANSI capabilities, but only does writes.
437437func makeConsole (out io.Writer ) io.Writer {
438+ if s , ok := out .(* streams.Out ); ok {
439+ return & _console {s }
440+ }
438441 return out
439442}
440443
@@ -444,21 +447,25 @@ type _console struct {
444447 * streams.Out
445448}
446449
447- func (c _console ) Read (p []byte ) (n int , err error ) {
450+ func (c * _console ) Read (p []byte ) (n int , err error ) {
448451 return 0 , errors .New ("not implemented" )
449452}
450453
451- func (c _console ) Close () error {
454+ func (c * _console ) Close () error {
452455 return nil
453456}
454457
455- func (c _console ) Fd () uintptr {
458+ func (c * _console ) Fd () uintptr {
456459 return c .FD ()
457460}
458461
459- func (c _console ) Name () string {
462+ func (c * _console ) Name () string {
460463 return "compose"
461464}
465+ func (c * _console ) File () * os.File {
466+ // streams.Out wraps the actual file. We attempt to unwrap it.
467+ return os .NewFile (c .Out .FD (), "compose" )
468+ }
462469
463470func toBakeExtraHosts (hosts types.HostsList ) map [string ]string {
464471 m := make (map [string ]string )
You can’t perform that action at this time.
0 commit comments