Skip to content

Commit

Permalink
add error to docekr build --rm
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
  • Loading branch information
vieux committed Feb 12, 2014
1 parent e7f91a6 commit a895c72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions buildfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ type buildFile struct {
func (b *buildFile) clearTmp(containers map[string]struct{}) {
for c := range containers {
tmp := b.runtime.Get(c)
b.runtime.Destroy(tmp)
fmt.Fprintf(b.outStream, "Removing intermediate container %s\n", utils.TruncateID(c))
if err := b.runtime.Destroy(tmp); err != nil {
fmt.Fprintf(b.outStream, "Error removing intermediate container %s: %s\n", utils.TruncateID(c), err.Error())
} else {
fmt.Fprintf(b.outStream, "Removing intermediate container %s\n", utils.TruncateID(c))
}
}
}

Expand Down

0 comments on commit a895c72

Please sign in to comment.