Skip to content
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

fastGlob('\\!dir/*') finds nothing even though a directory named !dir exists #261

Closed
thorn0 opened this issue Feb 25, 2020 · 6 comments
Closed

Comments

@thorn0
Copy link

thorn0 commented Feb 25, 2020

Environment

  • OS Version: WSL (10.0.18363.657) Ubuntu 18.04.1 LTS
  • Node.js Version: v10.15.0

Actual behavior

Nothing found.

Expected behavior

Files found.

Steps to reproduce

  1. Create a non-empty dir named !dir
  2. Run the code sample below

Code sample

console.log(require("fast-glob").sync("\\!dir/*"))
@thorn0
Copy link
Author

thorn0 commented Feb 26, 2020

Workaround: require("fast-glob").sync("@(!)dir/*")

@mrmlnc mrmlnc self-assigned this Feb 26, 2020
@mrmlnc
Copy link
Owner

mrmlnc commented Feb 26, 2020

Looks like the problem around the glob-parent package. The first part of the pattern is defined as the base directory.

{ pattern: '\\!dir/*', base: '\\!dir' }

@anthonytranDev
Copy link

@thorn0

Hey are you still working on this ticket. Was wondering whether I can help out?

Wanted to ask first - don't want to step over your toes

@thorn0
Copy link
Author

thorn0 commented Mar 19, 2020

I'm not working on it. It was just a bug report.

@mrmlnc
Copy link
Owner

mrmlnc commented Mar 21, 2020

I created a pull request to fix this problem in the glob-parent package (gulpjs/glob-parent#26).

@thorn0 & @anthonytranDev, please tell me in which case you are use ! in the directory name?

@mrmlnc
Copy link
Owner

mrmlnc commented Mar 22, 2020

Fixed by glob-parent@5.1.1.

In the simplest case, run this command to get the latest versions of dependencies:

npm i fast-glob

@mrmlnc mrmlnc closed this as completed Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants