浏览代码

Merge pull request #8938 from ndeloof/run_T

don't SetRawTerminal when run is ran with -T
Ulysses Souza 3 年之前
父节点
当前提交
dfa93d834f
共有 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