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

returns empty map instead of error if credentials not found in keychain

Signed-off-by: pgayvallet <pierre.gayvallet@gmail.com>
This commit is contained in:
pgayvallet
2019-04-18 16:04:42 +02:00
parent ecb01138bd
commit 1546024a83
+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)
} }