Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

add debug log to print keyring error

Maidul Islam68e05b7198b6
diff --git a/cli/packages/util/keyringwrapper.go b/cli/packages/util/keyringwrapper.go
index cadb72ebdb..0652719065 100644
--- a/cli/packages/util/keyringwrapper.go
+++ b/cli/packages/util/keyringwrapper.go
@@ -2,8 +2,10 @@ package util
import (
"encoding/base64"
+ "fmt"
"github.com/manifoldco/promptui"
+ "github.com/rs/zerolog/log"
"github.com/zalando/go-keyring"
)
@@ -26,6 +28,7 @@ func SetValueInKeyring(key, value string) error {
err = keyring.Set(currentVaultBackend, MAIN_KEYRING_SERVICE, key, value)
if err != nil {
+ log.Debug().Msg(fmt.Sprintf("Error while setting default keyring: %v", err))
configFile, _ := GetConfigFile()
if configFile.VaultBackendPassphrase == "" {
@@ -50,6 +53,7 @@ func SetValueInKeyring(key, value string) error {
}
err = keyring.Set(VAULT_BACKEND_FILE_MODE, MAIN_KEYRING_SERVICE, key, value)
+ log.Debug().Msg(fmt.Sprintf("Error while setting file keyring: %v", err))
}
return err