From 26b4a4920adca614f6be17a96f254f331271faf0 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Wed, 21 May 2014 17:11:57 -0400 Subject: [PATCH] This check was backwards. If I do a docker events > /tmp/out I do not want the control characters getting written to the file. The check should check the output file not the input file. Docker-DCO-1.1-Signed-off-by: Dan Walsh (github: rhatdan) --- api/client/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client/cli.go b/api/client/cli.go index 44cff0dc46..bb5d191e16 100644 --- a/api/client/cli.go +++ b/api/client/cli.go @@ -76,7 +76,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, proto, addr string, tlsC } if in != nil { - if file, ok := in.(*os.File); ok { + if file, ok := out.(*os.File); ok { terminalFd = file.Fd() isTerminal = term.IsTerminal(terminalFd) }