diff --git a/pkg/cfg/config.go b/pkg/cfg/config.go index a5aa3cd..aeddbaf 100644 --- a/pkg/cfg/config.go +++ b/pkg/cfg/config.go @@ -121,10 +121,11 @@ func getDefaultPath() string { func (conf *Config) Init() error { DefaultConfig := getDefaultPath() - switch { - case fileExists(DefaultConfig): + if conf.ConfigFile == "" && fileExists(DefaultConfig) { conf.ConfigFile = DefaultConfig - fallthrough + } + + switch { case conf.ConfigFile != "": if err := conf.LoadConfig(); err != nil { return err