From bad54069a7d42b5fdf2e3b288533627e22011c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 30 Jun 2022 22:47:42 +0200 Subject: [PATCH] Remove errors.Cause from RemoveAllAuthentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also replace switch with an if Signed-off-by: Miloslav Trmač --- pkg/docker/config/config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/docker/config/config.go b/pkg/docker/config/config.go index 2f8b70209..199bd3358 100644 --- a/pkg/docker/config/config.go +++ b/pkg/docker/config/config.go @@ -465,11 +465,10 @@ func RemoveAllAuthentication(sys *types.SystemContext) error { var creds map[string]string creds, err = listAuthsFromCredHelper(helper) if err != nil { - switch perrors.Cause(err) { - case exec.ErrNotFound: + if errors.Is(err, exec.ErrNotFound) { // It's okay if the helper doesn't exist. continue - default: + } else { // fall through } } else {