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:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user