Skip to content

Commit

Permalink
Fixed handling of formatting errors, no rewriting
Browse files Browse the repository at this point in the history
  • Loading branch information
mrusme committed Jan 18, 2022
1 parent d525e1a commit ac08eea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ac08eea

Please sign in to comment.