-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Negation not working when pattern begins with ! #62
Comments
Yep, this is a bug. |
It's not property respecting the |
@isaacs something like |
👍 |
2 similar comments
👍 |
👍 |
Work around isaacs/node-glob#62 by matching the whole tree first.
So what about it? |
Patch welcome. |
@isaacs I believe I have found the cause of the issue but need guidance on how best to fix. https://github.com/isaacs/minimatch/blob/master/minimatch.js#L237-L242
There could be two solutions:
Thoughts on how to approach? I can work on the fix either way. |
@isaacs I'm going to try to implement options 2 as the README seems to imply that |
Although now I'm confused. Upon further inspection this commit: isaacs/minimatch@b458f5d is from 2 and half years ago is when |
Beginning a pattern with ! seems to be broken. The result actually matches the non-negated pattern... so for example:
returns res as
['package.json']
, whereasreturns an array containing all files/directories in the cwd except package.json, as expected.
The text was updated successfully, but these errors were encountered: