-
Notifications
You must be signed in to change notification settings - Fork 113
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
[Feature Request] Provide a path escape function #158
Comments
Will be available with |
This was referenced Mar 10, 2020
5 tasks
ricardogobbosouza
added a commit
to webpack-contrib/stylelint-webpack-plugin
that referenced
this issue
May 3, 2020
* Avoiding mrmlnc/fast-glob#158 * Fixed the linter issues * chore: converted CRLF line endings to LF * Regenerated the lock file * chore: update lock file Co-authored-by: Ricardo Gobbo de Souza <[email protected]>
1 task
This was referenced Jul 19, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A common developer bug is where paths like
/Users/idevelop/Dropbox (Personal)/project/*
fail to be expanded because the parentheses are present in__dirname
and are interpreted as patterns by fastGlob. Other special characters that throw the globbing off are[]+{}
etc.The usual fix I see suggested is to explicitly disable some specific types of patterns, but I think the proper fix is for the absolute path to be properly escaped by the developer before appending the project-folder-specific glob patterns. One hurdle with that is that it's impractical for every dev to write their own escaping function, as they would likely miss some of the special characters.
Would you consider exposing a static function, such as
fastGlob.escapePath(path)
, which would escape all the characters that fastGlob considers special?The text was updated successfully, but these errors were encountered: