Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Comment

mngshm101e27514b64
diff --git a/server/pkg/utils/config/config.go b/server/pkg/utils/config/config.go
index 6f40c2a155..7254ff7b3e 100644
--- a/server/pkg/utils/config/config.go
+++ b/server/pkg/utils/config/config.go
@@ -40,6 +40,9 @@ func ConfigureViper(environment string) error {
viper.SetEnvPrefix("ENTE")
// Ask Viper to look for underscores (instead of dots) for nested configs.
viper.SetEnvKeyReplacer(strings.NewReplacer(`.`, `_`))
+
+ // Also replace "-" with underscores since "-" cannot be used in
+ // environment variable names.
viper.SetEnvKeyReplacer(strings.NewReplacer(`-`, `_`))
viper.SetConfigFile("configurations/" + environment + ".yaml")