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))