Skip to content

Commit

Permalink
Remove errors.Cause from RemoveAllAuthentication
Browse files Browse the repository at this point in the history
Also replace switch with an if

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Jun 30, 2022
1 parent 38ef0e0 commit bad5406
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/docker/config/config.go
Expand Up @@ -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 {
Expand Down

0 comments on commit bad5406

Please sign in to comment.