From 37f763f009f0c01d9ad5017271548c14407e497d Mon Sep 17 00:00:00 2001 From: Yuri Kanivetsky Date: Tue, 18 Jan 2022 06:38:56 +0200 Subject: [PATCH] Don't SetRawTerminal() when exec is run with -T Signed-off-by: Yuri Kanivetsky --- pkg/compose/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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