Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions cli/command/container/hijack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 0 additions & 10 deletions cli/command/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package command

import (
"io"
"os"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/term"
Expand All @@ -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 {
Expand Down