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

Should check for output, not error in deleteContainer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-01-03 14:45:39 +01:00
parent 884a1c2263
commit b029d3dee3
No known key found for this signature in database
GPG key ID: 083CC6FD6EB699A3

View file

@ -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
}
}