floatdrop / gulp-watch

Watch, that actually is an endless stream
MIT License
643 stars 99 forks source link

gulp-watch5.0.0 watch path like ''./src/nodeuii/**/*.js'' dosen't work on win10. #306

Open TJ666 opened 6 years ago

TJ666 commented 6 years ago

gulp-watch5.0.0 watch path like './src/nodeuii/*/.js' dose not work, but when i replace gulp-watch 4.3.11, it's OK. Platform Win 10.

wawss commented 6 years ago

@TJ666 Me too

abczdefg commented 6 years ago

Me too.

jonschlinkert commented 6 years ago

Does it work when you remove the invalid leading ./?

aglotoff commented 6 years ago

On my Windows 10 machine, any watch paths containing globstars don't work. The paths without globstars work just fine.

UPDATE: I believe, I figured out what the problem is. Before being passed to chokidar, all globs are converted to absolute paths and the slash function is used to replace all backslashes. However, this function doesn't perform replacement in paths containing any non-ASCII characters, e.g. if you use a different alphabet for your username and/or intermediate folders. And chokidar only accepts globs with forward slashes.

I created a PR addressing this issue.

tschiela commented 6 years ago

same on windows7

aglotoff commented 5 years ago

@floatdrop Could you please release v5.0.2 incorporating the changes in #313? And I believe, this issue can be closed.