feat: When values.yaml.gotmpl can't be parsed as YAML, print the YAML. (#703)

This helps a lot when debugging go templates.
This commit is contained in:
Erik Forsberg 2019-06-19 01:47:36 +02:00 committed by KUOKA Yusuke
parent ddb5be1b9d
commit 65818cd345
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ func (ld *EnvironmentValuesLoader) LoadEnvironmentValues(missingFileHandler *str
}
m := map[string]interface{}{}
if err := yaml.Unmarshal(bytes, &m); err != nil {
return nil, fmt.Errorf("failed to load environment values file \"%s\": %v", f, err)
return nil, fmt.Errorf("failed to load environment values file \"%s\": %v\n\nOffending YAML:\n%s", f, err, bytes)
}
maps = append(maps, m)
if ld.logger != nil {