Skip to content

Commit c7514a0

Browse files
committed
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 <[email protected]>
1 parent 36a3c50 commit c7514a0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

osxkeychain/osxkeychain.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ func (h Osxkeychain) List() (map[string]string, error) {
117117
default:
118118
return nil, err
119119
}
120-
} else if len(res) == 0 {
121-
return nil, credentials.NewErrCredentialsNotFound()
122120
}
123121

124122
resp := make(map[string]string)

0 commit comments

Comments
 (0)