diff --git a/watch.go b/watch.go index 1a0dbee0c7..80c08258d4 100644 --- a/watch.go +++ b/watch.go @@ -101,7 +101,7 @@ func (e *Executor) watchTasks(calls ...*Call) error { return } - if !event.Has(fsnotify.Remove) && !slices.Contains(files, event.Name) { + if !event.Has(fsnotify.Remove) && !slices.Contains(files, filepath.ToSlash(event.Name)) { relPath, _ := filepath.Rel(baseDir, event.Name) e.Logger.VerboseErrf(logger.Magenta, "task: skipped for file not in sources: %s\n", relPath) return