1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

- Builder: return an error when the build fails

This commit is contained in:
Solomon Hykes 2013-06-20 22:15:19 -07:00
parent 352991bdf4
commit d9bce2defd

7
api.go
View file

@ -773,9 +773,12 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
context = c
}
b := NewBuildFile(srv, utils.NewWriteFlusher(w))
if id, err := b.Build(context); err != nil {
id, err := b.Build(context)
if err != nil {
fmt.Fprintf(w, "Error build: %s\n", err)
} else if repoName != "" {
return err
}
if repoName != "" {
srv.runtime.repositories.Set(repoName, tag, id, false)
}
return nil