You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it looks like fast-glob has inconsistent behavior around trailing / in patterns and the behavior of only returning directories is only present if the pattern is dynamic (and otherwise fast-glob matches files too). in both glob and fs.glob, only directories are returned if the pattern ends with a /
Expected behavior
fast-glob only returns directories if the pattern ends with / even if it's a dynamic pattern
Steps to reproduce
use a dynamic pattern that ends with / (it only returns directories)
use a static pattern that refers to a file and ends with / (it matches the file)
Code sample
importglobfrom'fast-glob';// dynamic pattern, only returns folders so no files are matchedawaitglob(['*.ts/'],{onlyFiles: false});// static pattern, returns files tooawaitglob(['index.ts/'],{onlyFiles: false});
The text was updated successfully, but these errors were encountered:
Environment
Actual behavior
it looks like
fast-glob
has inconsistent behavior around trailing/
in patterns and the behavior of only returning directories is only present if the pattern is dynamic (and otherwisefast-glob
matches files too). in bothglob
andfs.glob
, only directories are returned if the pattern ends with a/
Expected behavior
fast-glob
only returns directories if the pattern ends with/
even if it's a dynamic patternSteps to reproduce
/
(it only returns directories)/
(it matches the file)Code sample
The text was updated successfully, but these errors were encountered: