summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-23 10:07:06 -0500
committerbaude <bbaude@redhat.com>2019-07-23 10:13:04 -0500
commita793bccae6d568d3f30534d66bea3d5a1e8d9302 (patch)
tree0e35bba61c97582527f9bd02cd48ad1b70e75c6f /pkg
parentce60c4d30c4acfa0c3ec9fc584c7eb88f84ac35f (diff)
downloadpodman-a793bccae6d568d3f30534d66bea3d5a1e8d9302.tar.gz
podman-a793bccae6d568d3f30534d66bea3d5a1e8d9302.tar.bz2
podman-a793bccae6d568d3f30534d66bea3d5a1e8d9302.zip
golangci-lint cleanup
a PR slipped through without running the new linter. this cleans things up for the master branch. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/adapter/terminal_linux.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/adapter/terminal_linux.go b/pkg/adapter/terminal_linux.go
index 33ca0833b..de2600b75 100644
--- a/pkg/adapter/terminal_linux.go
+++ b/pkg/adapter/terminal_linux.go
@@ -27,7 +27,11 @@ func ExecAttachCtr(ctx context.Context, ctr *libpod.Container, tty, privileged b
return -1, err
}
defer cancel()
- defer restoreTerminal(oldTermState)
+ defer func() {
+ if err := restoreTerminal(oldTermState); err != nil {
+ logrus.Errorf("unable to restore terminal: %q", err)
+ }
+ }()
}
return ctr.Exec(tty, privileged, env, cmd, user, workDir, streams, preserveFDs, resize, detachKeys)
}
@@ -121,7 +125,7 @@ func handleTerminalAttach(ctx context.Context, resize chan remotecommand.Termina
logrus.SetFormatter(&RawTtyFormatter{})
if _, err := term.SetRawTerminal(os.Stdin.Fd()); err != nil {
- return nil, nil, err
+ return cancel, nil, err
}
return cancel, oldTermState, nil