mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
config: Appropriate error message when newer config file is found (#3972)
This commit is contained in:
parent
a8cb43926a
commit
9ee83b89bb
@ -215,9 +215,10 @@ func validateConfig() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Check if config version is valid
|
||||
if srvCfg.Version != v17 {
|
||||
return errors.New("bad config version, expected: " + v17)
|
||||
// Older binary but newer config version.
|
||||
// Config version can never be older as it would have migrated.
|
||||
return fmt.Errorf("Expected config version: %s, newer config version found: %s", v17, srvCfg.Version)
|
||||
}
|
||||
|
||||
// Load config file json and check for duplication json keys
|
||||
|
@ -169,7 +169,7 @@ func initConfig() {
|
||||
|
||||
// Validate config file
|
||||
err = validateConfig()
|
||||
fatalIf(err, "Cannot validate configuration file")
|
||||
fatalIf(err, "Unable to validate configuration file")
|
||||
|
||||
// Once we have migrated all the old config, now load them.
|
||||
err = loadConfig(envs)
|
||||
|
Loading…
Reference in New Issue
Block a user