1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

osxkeychain: list: do not error out when keychain is empty

Commit 4cdcdc2 replaced the in-tree Objective-C code with github.com/keybase/go-keychain
and inadvertently introduced a new failure mode on the `List` operation -
it now fails when the keychain is empty.

Before:

```
$ ./bin/build/docker-credential-osxkeychain list
{}
```

After:

```
$ ./bin/build/docker-credential-osxkeychain list
credentials not found in native keychain
```

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2025-02-28 09:53:01 +01:00
parent 36a3c50452
commit c7514a0999
-2
View File
@@ -117,8 +117,6 @@ func (h Osxkeychain) List() (map[string]string, error) {
default: default:
return nil, err return nil, err
} }
} else if len(res) == 0 {
return nil, credentials.NewErrCredentialsNotFound()
} }
resp := make(map[string]string) resp := make(map[string]string)