diff --git a/config.go b/config.go index 76f49f4..378b0d1 100644 --- a/config.go +++ b/config.go @@ -744,6 +744,14 @@ func NewInclude(directives []string, hasEquals bool, pos Position, comment strin matches = removeDups(matches) inc.matches = matches for i := range matches { + // Skip directories - only process regular files + info, err := os.Stat(matches[i]) + if err != nil { + return nil, err + } + if info.IsDir() { + continue + } config, err := parseWithDepth(matches[i], depth) if err != nil { return nil, err