Should check for output, not error in deleteContainer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b029d3dee36d2d3c51b66557b4f03e493fe45fee
Component: engine
This commit is contained in:
Vincent Demeester
2017-01-04 11:15:36 +01:00
parent 6c03412403
commit 1f42780a09
@@ -124,7 +124,7 @@ func deleteContainer(ignoreNoSuchContainer bool, container ...string) error {
if ignoreNoSuchContainer && result.Error != nil {
// If the error is "No such container: ..." this means the container doesn't exists anymore,
// we can safely ignore that one.
if strings.Contains(result.Error.Error(), "No such container") {
if strings.Contains(result.Stderr(), "No such container") {
return nil
}
}