mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
Make the error message that comes from parsing the config file more
useful. Fixes #2080
This commit is contained in:
parent
e8223859d0
commit
cac70aded5
@ -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…
x
Reference in New Issue
Block a user