Skip to content

Commit c44d408

Browse files
Fix ignore path pattern
1 parent 5bdf687 commit c44d408

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/files/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package files
33
import (
44
"os"
55
"path/filepath"
6+
"strings"
67

78
"github.com/thoas/go-funk"
89
)
@@ -23,7 +24,7 @@ func ListFiles(dir string, toExclude []string) ([]string, error) {
2324
// Check if any shouldExclude expression matches file path
2425
shouldExclude := funk.Find(toExclude, func(exclude string) bool {
2526
matched, _ := filepath.Match(exclude, path)
26-
return matched
27+
return matched || strings.Contains(path, exclude)
2728
})
2829

2930
if shouldExclude == nil {

0 commit comments

Comments
 (0)