-
Notifications
You must be signed in to change notification settings - Fork 107
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
With onlyFiles: false
directories at the root are not included
#47
Comments
I'm not sure if this is the same issue:
// I expect this to return [ 'dir1', 'dir2' ]
// and it does
const results = await glob(['fixtures/*'], { onlyDirectories: true }); // I expect this to return [ 'fixtures' ],
// but it returns [ ]
const results = await glob(['fixtures'], { onlyDirectories: true }); |
Hello, @dylang, Looks like separated issue. Please create a issue for your problem. I can say right now, that this is works on my machine:
const fg = require('fast-glob');
const entries0 = fg.sync(['fixtures/*'], { onlyDirectories: true });
console.dir(entries0, { colors: true }); // [ 'fixtures/b' ]
const entries1 = fg.sync(['fixtures'], { onlyDirectories: true });
console.dir(entries1, { colors: true }); // [ 'fixtures' ] Are you sure you're using the latest version of the package? But I need more information about your case. Your version of the |
@mrmlnc You are correct, older version via |
Blocked by migrate to |
I am executing this code:
And I get |
Nope, if you want to get only directories, then you need to use the |
I don't want only directories, I want to get all dirs and files of my root directory, but instead I am getting an empty array, and I can assure you my root directory is not empty. P.S. even if I wanted only directories, I have just tested this code:
...and it also displays |
Any update on a fix for this? This issue is preventing me switching to fast-glob from node-glob (without a breaking change)..
As you can see in the example above, bash expands |
With the following directory tree:
For example with
node-glob
:The text was updated successfully, but these errors were encountered: