Browse code

Should check for output, not error in deleteContainer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Vincent Demeester authored on 2017/01/03 22:45:39
Showing 1 changed files
... ...
@@ -124,7 +124,7 @@ func deleteContainer(ignoreNoSuchContainer bool, container ...string) error {
124 124
 	if ignoreNoSuchContainer && result.Error != nil {
125 125
 		// If the error is "No such container: ..." this means the container doesn't exists anymore,
126 126
 		// we can safely ignore that one.
127
-		if strings.Contains(result.Error.Error(), "No such container") {
127
+		if strings.Contains(result.Stderr(), "No such container") {
128 128
 			return nil
129 129
 		}
130 130
 	}