Show error from TOML library when parsing fails

This commit is contained in:
Ryan Cavicchioni 2021-01-24 19:03:07 -06:00
parent 78ede4a084
commit 4f964c4b2c

View File

@ -24,7 +24,7 @@ func Main(args []string) (int, error) {
} }
if _, err := toml.DecodeFile(configPath, &config); err != nil { if _, err := toml.DecodeFile(configPath, &config); err != nil {
err = fmt.Errorf("fatal: failed to parse %s", configPath) err = fmt.Errorf("fatal: failed to parse %s; %w", configPath, err)
return ExitError, err return ExitError, err
} }