sindresorhus / globby

User-friendly glob matching
MIT License
2.52k stars 130 forks source link

ensureAbsolutePathForCwd method issue #153

Closed merickiranoglu closed 3 years ago

merickiranoglu commented 4 years ago

Greetings,

I've faced a problem while performing a nuxt generation. I've fixed it for my case, but I felt like I should report this.

cwd is... C:/Documents/ExampleFolder/... p is... C:\Documents\ExampleFolder...

I had to add this line of command to make it work. cwd = cwd.toString().replace(/\/gi,'/');

You might wanna check if cwd contains "\" character, or you will most probably provide a better solution.

GerHobbelt commented 3 years ago

related to #155. All paths fed into globby should indeed have their directory separators set to UNIX / via .replace(/\\/g, '/')