Watcher should ignore files not in sources before cancelling any running tasks. by trulede · Pull Request #2743 · go-task/task
Fix several issues with the watcher:
- the watcher would cancel running tasks before evaluating the watch condition and, if the skip condition existed, not even restart the cancelled tasks.
- events not being watched would cause running tasks to be cancelled (same root cause as above).
- a watched dir that was deleted and then recreated would no longer be watched.
- a new dir created, which should be watched, may not actually be watched.
Additional tests are added to cover most normal conditions.