Skip to content

🎧 Your Personal Streaming Service

Abort start-up if config file is invalid

Deluan9d459fbd0a1b
diff --git a/conf/configuration.go b/conf/configuration.go
index 7471af811..24d33cd40 100644
--- a/conf/configuration.go
+++ b/conf/configuration.go
@@ -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)
}
}