From f78ca73f1e2e2fbf4908c846f1697779817fe327 Mon Sep 17 00:00:00 2001 From: Georgi Dimitrov <82881135+georgijd-form3@users.noreply.github.com> Date: Mon, 27 Jun 2022 16:18:48 +0100 Subject: [PATCH] Update keychain.go --- keychain.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/keychain.go b/keychain.go index 8850922..34b4304 100644 --- a/keychain.go +++ b/keychain.go @@ -227,7 +227,13 @@ func (k *keychain) Remove(key string) error { } debugf("Removing keychain item service=%q, account=%q, keychain %q", k.service, key, k.path) - return gokeychain.DeleteItem(item) + err := gokeychain.DeleteItem(item) + if err == gokeychain.ErrorItemNotFound { + return ErrKeyNotFound + } + + return err + } func (k *keychain) Keys() ([]string, error) {