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

Fails when pattern contains '[' char #153

Closed
felixbillon opened this issue Jan 14, 2015 · 2 comments
Closed

Fails when pattern contains '[' char #153

felixbillon opened this issue Jan 14, 2015 · 2 comments

Comments

@felixbillon
Copy link

Hi everybody,

I'm using karma which using node-glob. My karma test run locally but does not run when TFS launch it. The different was the path : 'C:\Build\7[Dev] - refonte\Myproject'. In this path glob lib convert '[' in strange char. I don't know why ?

@isaacs
Copy link
Owner

isaacs commented Jan 14, 2015

[ is a magic char in globs, just like regexps. It'd be looking for:

C:\Build\7D - refonte\Myproject\
C:\Build\7e - refonte\Myproject\
C:\Build\7v - refonte\Myproject\

Escape the [ with a \ char, like "C:\\Build\\7\\[Dev\\] - refonte\\\Myproject\\" in js.

@isaacs isaacs closed this as completed Jan 14, 2015
@sinedied
Copy link

sinedied commented May 9, 2017

@isaacs Escaping does not work for me :/

I used the regexp in #277 and checked that the path is escaped properly, but it still tries to match it.

I'm on OSX BTW.

Sorry the issue seems to be related to mem-fs-editor which is using your lib, but no on your side, my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants