restoreTerminal restores the terminal if it was in raw mode; this prevents local echo from being disabled for the current terminal after forceful termination. It's a no-op if there's no prior state to restore.
(streams command.Streams)
| 466 | // local echo from being disabled for the current terminal after forceful |
| 467 | // termination. It's a no-op if there's no prior state to restore. |
| 468 | func restoreTerminal(streams command.Streams) { |
| 469 | streams.In().RestoreTerminal() |
| 470 | streams.Out().RestoreTerminal() |
| 471 | streams.Err().RestoreTerminal() |
| 472 | } |
| 473 | |
| 474 | //nolint:gocyclo |
| 475 | func runDocker(ctx context.Context, dockerCli *command.DockerCli) error { |
no test coverage detected
searching dependent graphs…