From c8fd65ea6aa8f8e252a52b1c2cc32dae2a9434d5 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(-) 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