refuse to start if the config file is invalid

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-12-10 16:50:15 +01:00
parent c71f0426ae
commit d8b040e57c
2 changed files with 4 additions and 4 deletions

View File

@@ -734,9 +734,9 @@ func LoadConfig(configDir, configFile string) error {
if errors.As(err, &viper.ConfigFileNotFoundError{}) {
logger.Debug(logSender, "", "no configuration file found")
} else {
// should we return the error and not start here?
logger.Warn(logSender, "", "error loading configuration file: %v", err)
logger.WarnToConsole("error loading configuration file: %v", err)
return err
}
}
checkOverrideDefaultSettings()