Remove the "err == nil" because is always equal nil.
@@ -57,7 +57,6 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
}
}
- if err == nil {
if image != "" { //pull
metaHeaders := map[string][]string{}
for k, v := range r.Header {
@@ -88,7 +87,6 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
}
err = s.backend.ImportImage(src, repo, os, tag, message, r.Body, output, r.Form["changes"])
}
- }
if err != nil {
if !output.Flushed() {
return err
