diff --git a/local/compose/exec.go b/local/compose/exec.go index d2230085..90fcba37 100644 --- a/local/compose/exec.go +++ b/local/compose/exec.go @@ -83,7 +83,7 @@ func (s *composeService) Exec(ctx context.Context, project *types.Project, opts defer resp.Close() if opts.Tty { - err := s.monitorTTySize(ctx, exec.ID, s.apiClient.ContainerExecResize) + s.monitorTTySize(ctx, exec.ID, s.apiClient.ContainerExecResize) if err != nil { return err } diff --git a/local/compose/resize.go b/local/compose/resize.go index 8453d4e6..0c972381 100644 --- a/local/compose/resize.go +++ b/local/compose/resize.go @@ -28,13 +28,13 @@ import ( "github.com/docker/docker/pkg/signal" ) -func (s *composeService) monitorTTySize(ctx context.Context, container string, resize func(context.Context, string, moby.ResizeOptions) error) error { +func (s *composeService) monitorTTySize(ctx context.Context, container string, resize func(context.Context, string, moby.ResizeOptions) error) { err := resize(ctx, container, moby.ResizeOptions{ // nolint:errcheck Height: uint(goterm.Height()), Width: uint(goterm.Width()), }) if err != nil { - return err + return } sigchan := make(chan os.Signal, 1) @@ -71,5 +71,4 @@ func (s *composeService) monitorTTySize(ctx context.Context, container string, r } } }() - return nil } diff --git a/local/compose/run.go b/local/compose/run.go index 8adbadeb..aad04d7b 100644 --- a/local/compose/run.go +++ b/local/compose/run.go @@ -96,10 +96,7 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types. return 0, err } - err = s.monitorTTySize(ctx, containerID, s.apiClient.ContainerResize) - if err != nil { - return 0, err - } + s.monitorTTySize(ctx, containerID, s.apiClient.ContainerResize) select { case status := <-statusC: