Fixed handling of formatting errors, no rewriting

pull/34/head
マリウス 2 years ago
parent d525e1ad31
commit ac08eea74c
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F

@ -74,6 +74,9 @@ func LoadConfig() (*Config, error) {
cfg := new(Config)
cfg.Shortcuts = make(map[string]string)
_, err = toml.Decode(string(configFileContent), &cfg)
if err != nil {
return nil, errors.New("The config could not be parsed, make sure it is valid TOML and you don't have double assignments.")
}
cfg.ConfigFile = configFile
err = cfg.LoadDefaults()

Loading…
Cancel
Save