summaryrefslogtreecommitdiff
path: root/watch.go
diff options
context:
space:
mode:
Diffstat (limited to 'watch.go')
-rw-r--r--watch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/watch.go b/watch.go
index fb34bf5..711f7dd 100644
--- a/watch.go
+++ b/watch.go
@@ -58,14 +58,14 @@ func Watch(path string, fn func(string) error) error {
if errors.Is(err, StopWatch) {
return nil
}
- return err
+ return nil
}
case err, ok := <-watcher.Errors:
if !ok {
return nil
}
if err != nil {
- return err
+ return fmt.Errorf("watcher: %w", err)
}
}
}