diff --git a/cli/command/container/hijack.go b/cli/command/container/hijack.go index c6815a4d7db7..0eb9fb003561 100644 --- a/cli/command/container/hijack.go +++ b/cli/command/container/hijack.go @@ -179,10 +179,7 @@ func (h *hijackedIOStreamer) beginInputStream(restoreInput func()) (doneC <-chan } func setRawTerminal(streams command.Streams) error { - if err := streams.In().SetRawTerminal(); err != nil { - return err - } - return streams.Out().SetRawTerminal() + return streams.In().SetRawTerminal() } func restoreTerminal(streams command.Streams, in io.Closer) error { diff --git a/cli/command/out.go b/cli/command/out.go index 27b44c235d69..a6266564b2f3 100644 --- a/cli/command/out.go +++ b/cli/command/out.go @@ -2,7 +2,6 @@ package command import ( "io" - "os" "github.com/Sirupsen/logrus" "github.com/docker/docker/pkg/term" @@ -19,15 +18,6 @@ func (o *OutStream) Write(p []byte) (int, error) { return o.out.Write(p) } -// SetRawTerminal sets raw mode on the input terminal -func (o *OutStream) SetRawTerminal() (err error) { - if os.Getenv("NORAW") != "" || !o.CommonStream.isTerminal { - return nil - } - o.CommonStream.state, err = term.SetRawTerminalOutput(o.CommonStream.fd) - return err -} - // GetTtySize returns the height and width in characters of the tty func (o *OutStream) GetTtySize() (uint, uint) { if !o.isTerminal {