-
Notifications
You must be signed in to change notification settings - Fork 114
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
Ignore pattern not working proprerly #329
Comments
i'm having the same issue with pattern |
I'm seeing the same behavior with the pattern |
Here's a super-simple repro:
|
About
|
I was encountering some quirkiness earlier, and I wasn't sure if it was similar to this issue. aus@Austins-MBP src % tree -a
.
├── foo
│ ├── bar.txt
│ └── ignore.txt
├── index.js
└── test
├── baz
│ ├── .not_this_either.txt
│ └── also_no.txt
└── no.txt
3 directories, 6 files const fg = require('fast-glob');
const resultsA = fg.sync('**/*.txt', {
ignore: ['**/test/**/*']
});
console.log(resultsA);
const resultsB = fg.sync('**/!(ignore)*.txt', {
ignore: ['**/test/**/*']
});
console.log(resultsB);
const resultsC = fg.sync('**/!(ignore)*.txt', {
ignore: ['**/test/**']
});
console.log(resultsC); aus@Austins-MBP src % node index.js
[ 'foo/bar.txt', 'foo/ignore.txt' ]
[ 'foo/bar.txt', 'test/baz/.not_this_either.txt' ]
[ 'foo/bar.txt' ] Results A: Works as expected. Gets all txt files, ignoring any in the test directory. I only encounter this when an ignore pattern is added to my pattern. If this is working as intended, or not related to this issue, please let me know. Thanks! |
Awaiting micromatch/picomatch#102. |
@timtim17, looks like a separate problem. Please fill another issue. |
Fixed by micromatch/picomatch#102 and released in 2.3.1. Since this is a transitive dependency on |
Environment
Actual behavior
Applying pattern that has ! doesn't seem to ignore correctly. When same, reversed pattern is used in ignore option, it works properly
Expected behavior
Steps to reproduce
Code sample
The text was updated successfully, but these errors were encountered: