1
0

feat: default keychain helper

This commit is contained in:
James Houlahan
2021-01-05 10:53:54 +01:00
parent 5380edeeb9
commit e442c47eed
4 changed files with 27 additions and 4 deletions

View File

@ -40,6 +40,14 @@ func init() { // nolint[noinit]
if _, err := exec.LookPath("gnome-keyring"); err == nil {
Helpers[GnomeKeyring] = newGnomeKeyringHelper
}
// If GnomeKeyring is available, use it by default.
// Otherwise, if pass is available, use it by default.
if _, ok := Helpers[GnomeKeyring]; ok {
defaultHelper = GnomeKeyring
} else if _, ok := Helpers[Pass]; ok {
defaultHelper = Pass
}
}
func newPassHelper(string) (credentials.Helper, error) {