Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only add exist paths to reloading target
Currently, `factories`, `test/factories` and `spec/factories` are specified by default as reload watching paths. In many applications, there are directories which do not exist (perhaps do not have` spec` if using minitest and do not have` spec` if using minitest). In Rails 5 series, if specify a path that does not exist in `EventedFileUpdateChecker`, its parent is added to the watching path. As a result, `node_modules` is also included in the watching path, and unexpectedly many directories and files are included in listen's watching targets. Also, if symlink is included in `node_modules`, it also causes warning of listen. This issue is solved in Rails 6. However, since many applications use this gem in Rails 5 and below, it is good not to add directories that do not exist on the gem side. Ref: rails/rails#32700
- Loading branch information