MCPcopy Index your code
hub / github.com/docker/cli / restoreTerminal

Method restoreTerminal

cli/streams/stream.go:47–51  ·  view source on GitHub ↗

restoreTerminal restores the terminal state if SetRawTerminal succeeded earlier.

()

Source from the content-addressed store, hash-verified

45
46// restoreTerminal restores the terminal state if SetRawTerminal succeeded earlier.
47func (s *commonStream) restoreTerminal() {
48 if s.state != nil {
49 _ = term.RestoreTerminal(s.fd, s.state)
50 }
51}
52
53func (s *commonStream) setRawTerminal(setter func(uintptr) (*term.State, error)) error {
54 if !s.tty || os.Getenv("NORAW") != "" {

Callers 2

RestoreTerminalMethod · 0.80
RestoreTerminalMethod · 0.80

Calls 1

RestoreTerminalMethod · 0.45

Tested by

no test coverage detected