mirror of
https://github.com/go-task/task.git
synced 2026-10-23 11:48:55 +03:00
fix: path normalisation in watcher (#3028)
This commit is contained in:
2
watch.go
2
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
|
||||
|
||||
Reference in New Issue
Block a user