From 17a7596af4f8e2898bd11945a5b3c085b882b021 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 14 Oct 2019 13:49:06 -0400 Subject: Unwrap errors before comparing them Unwrap errors before directly comparing them with errors defined by the storage and image libraries. Signed-off-by: Nalin Dahyabhai --- libpod/container_internal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/container_internal.go') diff --git a/libpod/container_internal.go b/libpod/container_internal.go index e7f541c52..a7ac23f73 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -533,7 +533,7 @@ func (c *Container) teardownStorage() error { // error - we wanted it gone, it is already gone. // Potentially another tool using containers/storage already // removed it? - if err == storage.ErrNotAContainer || err == storage.ErrContainerUnknown { + if errors.Cause(err) == storage.ErrNotAContainer || errors.Cause(err) == storage.ErrContainerUnknown { logrus.Warnf("Storage for container %s already removed", c.ID()) return nil } -- cgit v1.2.3-54-g00ecf