-
Notifications
You must be signed in to change notification settings - Fork 112
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
Braces for file extensions giving me a difficult time. #453
Comments
Could you simplify the reproduction case down to a single invocation example that fails, also sharing the exception thrown? E.g. fg.sync('/something/**/*.{jpg, jpeg, png, webp}', { optionA: true, optionB: 'whatever' });
// throws SomethingError People, including the readers, don't have time to decipher your code.. Cheers. |
There is no exception thrown hence no failure, just a failure to return results if I include the extensions in braces. Simplified |
Unfortunately, I cannot reproduce the problem, or I am doing it incorrectly, since there is no information about the directory structure in the issue. Please provide a minimal reproduction code. |
Sorry, not following on the question of directory structure. It's on Windows, so NTFS. They are directories that have 1 ... many files and some of those files are graphic files. Directory names contain spaces, hypens and text in brackets or parentheses. This is an example of a directory name -
Give me a few days and I'll try to give you some minimal code. |
Closing as it turned out to be user error on my part. My apologies. |
Environment
Windows 10, Node 20.15, Fast-glob 3.3.2, Electron 20.x.
Actual behavior
using brace expansion to find graphic files in different folders fails. It will work just using individual extension for the run
Expected behavior
finding graphic files specified in the braces I've included
Steps to reproduce
IDK really, I am using FG is 3 other scripts in this project and it works fine using similar code.
Code sample
// Paste your code here.
Also
/*.{jpg,jpeg,png,webp} fails as well.
What works is
const cover = fg.sync(
${escapedPath}/**/*.jpg, options);
edit: meant to add that I can do this - fg.sync(`${escapedPath}/* which returns everything in the directory, and I guess that might be an option if I have no choice
The text was updated successfully, but these errors were encountered: