mirror of
https://github.com/containers/podman.git
synced 2025-05-28 21:46:51 +08:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user