diff --git a/internal/config/config.go b/internal/config/config.go index 6c36fc5..3d16db6 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -243,14 +243,14 @@ func (c *AppConfig) load(configPath string) { for _, key := range viper.AllKeys() { envKey := strings.ToUpper(strings.ReplaceAll(key, ".", "_")) - err := viper.BindEnv(key, "AUTOBRR_"+envKey) + err := viper.BindEnv(key, "AUTOBRR__"+envKey) if err != nil { log.Fatal("config: unable to bind env: " + err.Error()) } } if err := viper.Unmarshal(c.Config); err != nil { - log.Fatalf("Could not unmarshal config file: %v", viper.ConfigFileUsed()) + log.Fatalf("Could not unmarshal config file: %v: err %q", viper.ConfigFileUsed(), err) } }