Make the error message that comes from parsing the config file more
useful. Fixes #2080
This commit is contained in:
parent
c3569011b7
commit
735efccd6e
|
@ -64,7 +64,12 @@ func LoadConfig(path string) (*DefaultConfig, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return ParseConfig(string(contents))
|
||||
conf, err := ParseConfig(string(contents))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error parsing config file at %s: %q. Ensure that the file is valid; Ansible Vault is known to conflict with it.", path, err)
|
||||
}
|
||||
|
||||
return conf, nil
|
||||
}
|
||||
|
||||
// ParseConfig parses the given configuration as a string.
|
||||
|
|
Loading…
Reference in New Issue