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:
parent
352991bdf4
commit
d9bce2defd
1 changed files with 5 additions and 2 deletions
7
api.go
7
api.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue