Fix loading config from given path

This commit is contained in:
Peter 2022-02-16 08:58:49 +01:00
parent 7eb4d67f95
commit 234929e5ed
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9

View file

@ -24,11 +24,11 @@ func Load(workingDir, configFile string) (cfg *Components, err error) {
return nil, err return nil, err
} else { } else {
loader.AddConfigPath(home) loader.AddConfigPath(home)
loader.AddConfigPath(workingDir)
loader.SetConfigName("goveal")
loader.SetConfigType("yaml")
} }
loader.AddConfigPath(workingDir)
loader.SetConfigName("goveal")
loader.SetConfigType("yaml")
loader.AutomaticEnv() loader.AutomaticEnv()
if err = loader.ReadInConfig(); err == nil { if err = loader.ReadInConfig(); err == nil {