From 5a64d0802212cb427f4d7c96fd770fcb38b50ee3 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Tue, 19 Sep 2023 22:14:52 +0200 Subject: [PATCH] Add warning for error when reading config --- agent/unixsocketagent.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/agent/unixsocketagent.go b/agent/unixsocketagent.go index c62790c..525ed3f 100644 --- a/agent/unixsocketagent.go +++ b/agent/unixsocketagent.go @@ -94,8 +94,6 @@ func serveAgentSession(c net.Conn, ctx context.Context, vault *vault.Vault, cfg } type AgentState struct { - vault *vault.Vault - config *config.ConfigFile } func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error { @@ -106,6 +104,7 @@ func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error { var vault = vault.NewVault(&keyring) cfg, err := config.ReadConfig(runtimeConfig) if err != nil { + log.Warn("Could not read config: %s", err.Error()) cfg = config.DefaultConfig() cfg.ConfigFile.RuntimeConfig = runtimeConfig cfg.WriteConfig()