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
How to exclude multiple files/directories from a folder #292
Comments
Sorry for the confusing UI/UX here. The exclude paths are globs themselves, and we test if the glob expansion from the path matches the glob in the exclude. So in this case, we are checking if the glob - link:
~/test/:
path: test/*
exclude: [test/first.txt, test/second.txt]
glob: true Then it should work. I think this is confusing; intuitively, you might expect the exclude patterns to match against the Hope this solves your immediate problem, and would appreciate hearing any thoughts you have on this matter. |
Yes, thats how i thought it would behave and in I think that would be better than the current solution. The solution you gave me works, but i still have problems excluding directories. - link:
~/test/:
path: test/*
exclude: [test/not_wanted_dir]
glob: true Gives me the error:
Adding a trailing slash to the dir: How can I solve this? I thought it would work exactly like files do, by just mentioning their name (without trailing slash). Also because you asked my about my opinion: - link:
~/test/:
exclude: [not_wanted_dir, not_wanted_file, dir_inside_test/*.build] Everthing written inside exclude should be relative to the directory mentioned above (here test/) While writing this i think i know now the reason, its probably if you dont want to exclude, its if you want to only include files matching a glob right? |
Your first example works, when there are files to include. I think the error message is confusing/wrong in that setting, it should have instead been a warning that there are no files that match that combo of glob + exclude. If I have this directory structure:
And this config: - link:
~/test:
path: test/*
exclude: [test/not_wanted_dir]
glob: true I get the intended results, with You don't need to specify things like |
Thanks for your help, got it working :) |
Docs added in 9f8fd76. Thanks again for pointing this out. |
I tried the following:
But it keeps adding everything in the directory.
I also tried:
Its probably some basic thing but i cant figure it out, thanks.
The text was updated successfully, but these errors were encountered: