1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-14 00:11:28 +05:30

List wraps the error from secretservice_linux.c.

List wraps the error from secretservice_linux.c so the List can give the caller more useful error message for diagnosing.

Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
Qi Wang
2020-11-02 16:58:46 -05:00
parent fc9290adbc
commit 8086f00d7d
+2 -1
View File
@@ -96,7 +96,8 @@ func (h Secretservice) List() (map[string]string, error) {
defer C.freeListData(&acctsC, listLenC)
if err != nil {
defer C.g_error_free(err)
return nil, errors.New("Error from list function in secretservice_linux.c likely due to error in secretservice library")
errMsg := (*C.char)(unsafe.Pointer(err.message))
return errors.New(C.GoString(errMsg))
}
resp := make(map[string]string)