Show error from TOML library when parsing fails

This commit is contained in:
Ryan Cavicchioni 2021-01-24 19:03:07 -06:00
parent b1894b38de
commit 743d0eed7c
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

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
} }