Abort start-up if config file is invalid

This commit is contained in:
Deluan 2023-02-06 13:00:07 -05:00 committed by Joe Stump
parent 555f059dff
commit 5528095329
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -339,6 +339,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)
}
}