-
-
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
delete nothing with file name like "[app+1]xxx" #70
Comments
Had a similar problem. |
can confirm. this indeed does not work. on further investigation, I found out that this has to do with isaacs/minimatch#50 minimatch is a dependency of glob which is a dependency of globby which is a dependency of TL;DR del
└── globby
└── glob
└── minimatch It might work if we escape Unfortunately, I couldn't find where the code change happens :( |
Newer versions of |
Yes, try escaping special characters, like: However, it seems like this might be a bug. IMHO it seems like that should match without having to escape anything. I'll look into it in micromatch, since this might be confusing for some users when a file path is passed, versus a glob pattern. Beyond that... here are a few potential solutions that come to mind in the meantime, or in addition to patching micromatch:
If someone wants to create an issue on micromatch that would be great. Otherwise I'll create one as soon as I have a chance. |
@jonschlinkert, I tried escaping and found that it actually doesn't work at all, at least using
// Unescaped
await globby([
'foo/[bar].js',
'foo/foo [bar]/[foo].js',
'foo/[unicorn+1].js',
'foo/foo+1.js'
]);
//=> ['foo/[bar].js', 'foo/foo [bar]/[foo].js', 'foo/foo+1.js']
// Single slash
await globby([
'foo/\[bar\].js',
'foo/foo \[bar\]/\[foo\].js',
'foo/\[unicorn\+1\].js',
'foo/foo+1.js'
]);
//=> ['foo/[bar].js', 'foo/foo [bar]/[foo].js', 'foo/foo+1.js']
// Double slash
await globby([
'foo/\\[bar\\].js',
'foo/foo \\[bar\\]/\\[foo\\].js',
'foo/\\[unicorn\\+1\\].js',
'foo/foo+1.js'
]);
//=> ['foo/foo+1.js'] This might be related sindresorhus/globby#81. |
Got it, thanks for investigating. I'll look into it a bit more as well. |
delete nothing with file name like:
[app+1]OMStarPS_omstarps_12.3.0_5b866543ab78483cf07c4012.zip
if change file name to:
app_1_OMStarPS_omstarps_12.3.0_5b866653ab78483cf07c401b.zip
could be delete correctly.
can you gave some advise?
The text was updated successfully, but these errors were encountered: