From 9c091e42db6c0f03977456b167eb1d2641c3ee74 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Thu, 16 Sep 2021 00:36:13 +0200 Subject: fix inverted condition [NO TESTS NEEDED] Signed-off-by: Matej Vasek --- pkg/api/handlers/compat/images_push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api/handlers/compat') diff --git a/pkg/api/handlers/compat/images_push.go b/pkg/api/handlers/compat/images_push.go index 07ff76819..8b6d3d56a 100644 --- a/pkg/api/handlers/compat/images_push.go +++ b/pkg/api/handlers/compat/images_push.go @@ -152,7 +152,7 @@ loop: // break out of for/select infinite loop case err := <-pushErrChan: if err != nil { var msg string - if errors.Cause(err) != storage.ErrImageUnknown { + if errors.Is(err, storage.ErrImageUnknown) { msg = "An image does not exist locally with the tag: " + imageName } else { msg = err.Error() -- cgit v1.2.3-54-g00ecf