Skip to content

Commit 21445d5

Browse files
committed
Fix attach issue
Signed-off-by: apostasie <[email protected]>
1 parent fde9d97 commit 21445d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/cmd/container/attach.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121
"errors"
2222
"fmt"
23+
"os"
2324

2425
"github.com/containerd/console"
2526
containerd "github.com/containerd/containerd/v2/client"
@@ -115,7 +116,7 @@ func Attach(ctx context.Context, client *containerd.Client, req string, options
115116
if err != nil {
116117
return err
117118
}
118-
opt = cio.WithStreams(in, con, nil)
119+
opt = cio.WithStreams(in, os.Stdout, os.Stderr)
119120
} else {
120121
opt = cio.WithStreams(options.Stdin, options.Stdout, options.Stderr)
121122
}

0 commit comments

Comments
 (0)