From f0293e1a1b22784882798691d865dea0def87dc2 Mon Sep 17 00:00:00 2001 From: James Rawlings Date: Wed, 9 Nov 2022 14:30:06 +0000 Subject: [PATCH] skip file rather than exit when a yaml file with no melange package name found noticed this when running dag in a folder that had other yaml files which were not melange configs, so wanted dag to ignore these files. Signed-off-by: James Rawlings --- pkg/graph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/graph.go b/pkg/graph.go index b7cb150..cd553a2 100644 --- a/pkg/graph.go +++ b/pkg/graph.go @@ -59,7 +59,8 @@ func NewGraph(dirFS fs.FS) (*Graph, error) { } name := c.Package.Name if name == "" { - log.Fatalf("no package name in %q", path) + log.Printf("no package name in %q", path) + return nil } if _, exists := configs[name]; exists { log.Fatalf("duplicate package config found for %q in %q", c.Package, path)