feat: add filename to error message when yaml file is invalid
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

Before:
FATA <internal/validate.go:84> unable to validate recipe: yaml: line 3: did not find expected key

After:
FATA <internal/validate.go:84> unable to validate recipe: <redacted>/recipes/monitoring-ng/compose.grafana-oidc.yml: yaml: line 3: did not find expected key
This commit is contained in:
2026-03-20 14:41:53 +01:00
parent 9d401202b4
commit e04a1e15c4

View File

@ -138,7 +138,7 @@ func loadConfigFile(filename string) (*composetypes.ConfigFile, error) {
config, err := loader.ParseYAML(bytes)
if err != nil {
return nil, err
return nil, fmt.Errorf("%s: %s", filename, err)
}
return &composetypes.ConfigFile{