Skip to content

Commit

Permalink
Fix match any function to work for multiple patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Saccilotto committed Mar 2, 2022
1 parent 0037e09 commit e01b796
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/hot-reload/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ func matchesAny(path string, patterns []string) bool {
for _, pattern := range patterns {
// use wildmatch-library for simple pattern matching
matcher := wildmatch.NewWildMatch(pattern)
return matcher.IsMatch(path)
if matcher.IsMatch(path) {
return true
}
}

return false
Expand Down

0 comments on commit e01b796

Please sign in to comment.