mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
refuse to start if the config file is invalid
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user