Abort start-up if config file is invalid
This commit is contained in:
parent
9b2dd1bb06
commit
9d459fbd0a
|
@ -319,6 +319,7 @@ func InitConfig(cfgFile string) {
|
|||
err := viper.ReadInConfig()
|
||||
if viper.ConfigFileUsed() != "" && err != nil {
|
||||
_, _ = fmt.Fprintln(os.Stderr, "FATAL: Navidrome could not open config file: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue