Skip to content

Commit

Permalink
fix: ignore empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Jul 22, 2024
1 parent 3209c55 commit a60eb53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/lefthook/runner/filters/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ func byExclude(vs []string, matcher interface{}) []string {

return vsf
case []interface{}:
if len(exclude) == 0 {
return vs
}

globs := make([]glob.Glob, 0, len(exclude))
for _, name := range exclude {
globs = append(globs, glob.MustCompile(name.(string)))
Expand Down

0 comments on commit a60eb53

Please sign in to comment.