pestphp / pest-plugin-watch

The Pest Plugin Watch
https://pestphp.com
MIT License
17 stars 10 forks source link

Update fswatch arguments to remove the infinite loop on Ubuntu #19

Closed eta-orionis closed 1 year ago

eta-orionis commented 1 year ago

On Ubunutu, and presumably other Linuxes, fswatch triggers even for directory accesses, resulting in an infinite loop (https://github.com/pestphp/pest-plugin-watch/issues/7#issuecomment-894317561).

This change filters fswatch events to only those when a file/dir is created, removed, or added.

vicholp commented 1 year ago

Can confirm that this solve the issue in Ubuntu 22.04.

It is a bit slow detecting changes, but that should be a fswatch issue.

augustjanse commented 1 year ago

Appears to work as expected in Ubuntu on WSL. Thanks!