-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Very confused at glob behavior in 5.x vs 4.x #126
Comments
@sindresorhus Can you give any feedback? Either I'm missing something very basic or something is very wrong in the new behavior. If the new behavior is to be expected then it would seem some major documentation changes are in order for how to write glob patterns. |
This might be related to the following issues:
Just a guess. I don't really have the time to look further into this right now. |
I still for the life of me can't figure out how to use this library (since v5.x) to accomplish the specific use case above. Namely, to delete content based on a pattern such as Can anyone point to a test repo using the latest version of this library where a pattern like |
I've tried to do some diagnostics on what might be going on and have now opened the following issue in the
|
At first I thought my issues were related to Windows, but I'm experiencing the same behavior in Linux as well (and also using
slash
to transform any Windows-specific paths).I've created a test repo here: https://github.com/dlong500/node-cli-base
In my real projects I'm using several types of glob patterns, but the test repo above demonstrates a relatively simple pattern:
/opt/nodejs/node-cli-base/testdata/test?/?
Assuming a testdata folder contents of the following folders:
I would expect the following folders to be deleted:
I get the expected result with del v4.1.1, but no folders are deleted at all with del 5.1.0.
What exactly am I doing wrong? I've read through all the documentation and it doesn't seem like any glob pattern syntax has changed. I've also tried passing
extglob: true
,onlyFiles: false
, andcaseSensitiveMatch: false
just to see if the behavior changes (even though I believe those are defaults) to no avail.The text was updated successfully, but these errors were encountered: