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

Merge pull request #143 from pgayvallet/osx-list-no-error-on-missing-key

Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain
This commit is contained in:
Guillaume Tardif
2019-04-29 16:27:28 +02:00
committed by GitHub
+4
View File
@@ -113,6 +113,10 @@ func (h Osxkeychain) List() (map[string]string, error) {
if errMsg != nil { if errMsg != nil {
defer C.free(unsafe.Pointer(errMsg)) defer C.free(unsafe.Pointer(errMsg))
goMsg := C.GoString(errMsg) goMsg := C.GoString(errMsg)
if goMsg == errCredentialsNotFound {
return make(map[string]string), nil
}
return nil, errors.New(goMsg) return nil, errors.New(goMsg)
} }