diff --git a/commands.go b/commands.go index 43ff0ca24f..0475b09451 100644 --- a/commands.go +++ b/commands.go @@ -512,10 +512,9 @@ func (srv *Server) CmdPush(stdin io.ReadCloser, stdout io.Writer, args ...string return err } return nil - } else { - return err } - return nil + + return err } err = srv.runtime.graph.PushImage(stdout, img, srv.runtime.authConfig) if err != nil {