Fix bug migrating config, add test
This commit is contained in:
@@ -224,6 +224,8 @@ func (cs *ConfigService) LoadConfig() error {
|
||||
return fmt.Errorf("Could not read config '%s': %v", path, err)
|
||||
}
|
||||
c := Config{}
|
||||
cs.Config = &c
|
||||
|
||||
err = yaml.Unmarshal(b, &c)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Could not parse YAML config '%s': %v", path, err)
|
||||
@@ -243,8 +245,6 @@ func (cs *ConfigService) LoadConfig() error {
|
||||
cs.WriteConfig()
|
||||
}
|
||||
|
||||
cs.Config = &c
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user