mirror of
https://github.com/mrusme/superhighway84.git
synced 2024-11-05 06:01:04 +00:00
Fixed handling of formatting errors, no rewriting
This commit is contained in:
parent
d525e1ad31
commit
ac08eea74c
@ -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…
Reference in New Issue
Block a user