Abort start-up if config file is invalid

This commit is contained in:
Deluan 2023-02-06 13:00:07 -05:00
parent 9b2dd1bb06
commit 9d459fbd0a
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}
}