Add warning for error when reading config
This commit is contained in:
parent
10ec5f6fc9
commit
5a64d08022
|
@ -94,8 +94,6 @@ func serveAgentSession(c net.Conn, ctx context.Context, vault *vault.Vault, cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
type AgentState struct {
|
type AgentState struct {
|
||||||
vault *vault.Vault
|
|
||||||
config *config.ConfigFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error {
|
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)
|
var vault = vault.NewVault(&keyring)
|
||||||
cfg, err := config.ReadConfig(runtimeConfig)
|
cfg, err := config.ReadConfig(runtimeConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Warn("Could not read config: %s", err.Error())
|
||||||
cfg = config.DefaultConfig()
|
cfg = config.DefaultConfig()
|
||||||
cfg.ConfigFile.RuntimeConfig = runtimeConfig
|
cfg.ConfigFile.RuntimeConfig = runtimeConfig
|
||||||
cfg.WriteConfig()
|
cfg.WriteConfig()
|
||||||
|
|
Loading…
Reference in New Issue