diff --git a/pkg/compose/exec.go b/pkg/compose/exec.go index 961589b01..b0f06004c 100644 --- a/pkg/compose/exec.go +++ b/pkg/compose/exec.go @@ -96,7 +96,7 @@ func (s *composeService) interactiveExec(ctx context.Context, opts api.RunOption } in := streams.NewIn(opts.Stdin) - if in.IsTerminal() { + if in.IsTerminal() && opts.Tty { state, err := term.SetRawTerminal(in.FD()) if err != nil { return err