瀏覽代碼

don't SetRawTerminal when run is ran with -T

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

+ 1 - 1
pkg/compose/run.go

@@ -62,7 +62,7 @@ func (s *composeService) runInteractive(ctx context.Context, containerID string,
 	}
 
 	in := streams.NewIn(opts.Stdin)
-	if in.IsTerminal() {
+	if in.IsTerminal() && opts.Tty {
 		state, err := term.SetRawTerminal(in.FD())
 		if err != nil {
 			return 0, err