Skip to content

Commit bb5995d

Browse files
committed
✨ Remove patterns that are ignored (#19)
In order to prevent race conditions in node-glob, this will now remove matching patterns that exist in the ignore patterns.
1 parent 20f3da7 commit bb5995d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class ModClean_Utils extends EventEmitter {
7474
patterns = uniq(patterns);
7575
ignore = uniq(ignore);
7676

77+
patterns = patterns.filter(pat => ignore.indexOf(pat) === -1);
78+
7779
if(!patterns.length) throw new Error('No patterns have been loaded, nothing to check against');
7880

7981
return {

0 commit comments

Comments
 (0)