config.go: parse config file before default

Closes https://gitlab.com/commento/commento/issues/187
This commit is contained in:
Adhityaa Chandrasekar
2019-08-21 21:07:44 -07:00
parent 9538c9036e
commit 52f8df5183
4 changed files with 15 additions and 13 deletions

View File

@@ -41,11 +41,12 @@ func configFileLoad(filepath string) error {
continue
}
if os.Getenv(key[9:]) != "" {
if os.Getenv(key) != "" {
// Config files have lower precedence.
continue
}
os.Setenv(key[9:], value)
os.Setenv(key, value)
}
return nil