Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

! pattern does not work correctly #2

Open
last-Programmer opened this issue Nov 14, 2019 · 0 comments
Open

! pattern does not work correctly #2

last-Programmer opened this issue Nov 14, 2019 · 0 comments

Comments

@last-Programmer
Copy link

ar globArray = {};
globArray.sync = function(patterns, options) {
var fileMatches = [];
patterns = patterns || [];
options = options || {};

patterns.forEach(function(pattern) {
var patternMatches = glob.sync(pattern, options);

if(pattern.substr(0, 1) !== '!') {
  fileMatches = fileMatches.concat(patternMatches);
} else {
  filterNegative(patternMatches, fileMatches);
}

});

return fileMatches;
};

just change this line please

var patternMatches = glob.sync(pattren.startsWith("!") && pattern.substr(1) ||  pattern, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant