diff --git a/cmd/backup/config_provider.go b/cmd/backup/config_provider.go index 4225d708..8cda171b 100644 --- a/cmd/backup/config_provider.go +++ b/cmd/backup/config_provider.go @@ -103,7 +103,12 @@ func loadConfigsFromEnvFiles(directory string) ([]*Config, error) { if err != nil { return nil, errwrap.Wrap(err, fmt.Sprintf("error reading %s", item.Name())) } - envFile, err := godotenv.Unmarshal(os.ExpandEnv(string(f))) + envFile, err := godotenv.Unmarshal(os.Expand(string(f), func(s string) string { + if val, ok := os.LookupEnv(s); ok { + return val + } + return s + })) if err != nil { return nil, errwrap.Wrap(err, fmt.Sprintf("error reading config file %s", p)) }