From e04a1e15c4459cc7be5e91f0761c6edff33eb2c8 Mon Sep 17 00:00:00 2001 From: p4u1 Date: Fri, 20 Mar 2026 14:41:53 +0100 Subject: [PATCH] feat: add filename to error message when yaml file is invalid Before: FATA unable to validate recipe: yaml: line 3: did not find expected key After: FATA unable to validate recipe: /recipes/monitoring-ng/compose.grafana-oidc.yml: yaml: line 3: did not find expected key --- pkg/upstream/stack/loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/upstream/stack/loader.go b/pkg/upstream/stack/loader.go index 1910129a..a6259903 100644 --- a/pkg/upstream/stack/loader.go +++ b/pkg/upstream/stack/loader.go @@ -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{ -- 2.49.0