From abd99be4fd093a282efc0adb7b7e9b06d57cceb3 Mon Sep 17 00:00:00 2001 From: "hiroto.toyoda" Date: Thu, 1 Jan 2026 01:22:59 +0900 Subject: [PATCH] refactor(attach): remove unused detach watcher and keep attach behavior Signed-off-by: hiroto.toyoda --- pkg/compose/attach.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/compose/attach.go b/pkg/compose/attach.go index 639e0ea53..7e7460e25 100644 --- a/pkg/compose/attach.go +++ b/pkg/compose/attach.go @@ -53,7 +53,6 @@ func (s *composeService) attach(ctx context.Context, project *types.Project, lis _, err = fmt.Fprintf(s.stdout(), "Attaching to %s\n", strings.Join(names, ", ")) if err != nil { logrus.Debugf("failed to write attach message: %v", err) - return nil, err } for _, ctr := range containers { @@ -96,17 +95,12 @@ func (s *composeService) doAttachContainer(ctx context.Context, service, id, nam }) }) - restore, detached, err := s.attachContainerStreams(ctx, id, inspect.Config.Tty, nil, wOut, wErr) + restore, _, err := s.attachContainerStreams(ctx, id, inspect.Config.Tty, nil, wOut, wErr) if err != nil { return err } defer restore() - go func() { - <-detached - logrus.Debugf("detached from container %s", name) - }() - return nil }