瀏覽代碼

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

Signed-off-by: Yuri Kanivetsky <[email protected]>
Yuri Kanivetsky 3 年之前
父節點
當前提交
37f763f009
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/compose/exec.go

+ 1 - 1
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