Don't SetRawTerminal() when exec is run with -T

Signed-off-by: Yuri Kanivetsky <yuri.kanivetsky@gmail.com>
This commit is contained in:
Yuri Kanivetsky 2022-01-18 06:38:56 +02:00 committed by Nicolas De loof
parent 99cd90a4b2
commit 37f763f009
1 changed files with 1 additions and 1 deletions

View File

@ -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