Skip to content

Commit e438108

Browse files
committed
fix(disk): handle glob errors consistently
Signed-off-by: Dwi Siswanto <[email protected]>
1 parent 682e2e1 commit e438108

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/catalog/disk/find.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,12 @@ func (c *DiskCatalog) findGlobPathMatches(absPath string, processed map[string]s
142142

143143
if c.templatesFS != nil {
144144
matches, err = fs.Glob(c.templatesFS, relPath)
145-
if err != nil {
146-
return matches, err
147-
}
148145
} else {
149146
matches, err = filepath.Glob(absPath)
150-
if err != nil {
151-
return matches, err
152-
}
147+
}
148+
149+
if err != nil {
150+
return nil, err
153151
}
154152

155153
results := make([]string, 0, len(matches))

0 commit comments

Comments
 (0)