From 0e793551cf777eea9fda9d821567e444c78feed8 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Wed, 7 May 2025 21:36:11 +0700 Subject: [PATCH] fix(disk): handle glob errors consistently Signed-off-by: Dwi Siswanto --- pkg/catalog/disk/find.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/catalog/disk/find.go b/pkg/catalog/disk/find.go index 3d8939c04..36d01180f 100644 --- a/pkg/catalog/disk/find.go +++ b/pkg/catalog/disk/find.go @@ -141,14 +141,12 @@ func (c *DiskCatalog) findGlobPathMatches(absPath string, processed map[string]s if c.templatesFS != nil { matches, err = fs.Glob(c.templatesFS, relPath) - if err != nil { - return matches, err - } } else { matches, err = filepath.Glob(absPath) - if err != nil { - return matches, err - } + } + + if err != nil { + return nil, err } results := make([]string, 0, len(matches))