Explorar o código

don't SetRawTerminal when run is ran with -T

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof %!s(int64=3) %!d(string=hai) anos
pai
achega
f69a613e69
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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