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

isGlob return false for windows path with backslashes #317

Closed
VdustR opened this issue Jan 24, 2019 · 3 comments · Fixed by #339
Closed

isGlob return false for windows path with backslashes #317

VdustR opened this issue Jan 24, 2019 · 3 comments · Fixed by #339

Comments

@VdustR
Copy link

VdustR commented Jan 24, 2019

As the case we have pattern.from = 'C:\my-repo\{manifest,manifest}.json' in windows and pattern.from = '/my-repo/{manifest,manifest}.json' in linux.

if (isGlob(pattern.from) || pattern.from.indexOf('*') !== -1) {

It returned true in linux but returned false in windows because of micromatch/is-glob#10.

Tried:

> require('is-glob')('C:\\{foo,bar}.js')
false
> require('is-glob')('/{foo,bar}.js')
true

I also tried is-glob@2.0.1 and got true in both cases.

Any idea to make it works in Windows? Thanks!

egoist/poi#533

@alexander-akait
Copy link
Member

@VdustR let's wait answer from is-glob, don't think what we can fixed it on our side

@alexander-akait
Copy link
Member

Won't fix micromatch/is-glob#9, feel free to send a PR with workaround

@alexander-akait
Copy link
Member

Of somebody can find workaround PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment