mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Abort start-up if config file is invalid
This commit is contained in:
parent
9b2dd1bb06
commit
9d459fbd0a
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue