Skip to content

Commit

Permalink
Ignore WRITE events on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
danawoodman committed Feb 27, 2024
1 parent 21cb35e commit 8be47db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func (w *Watcher) Start() {
w.log("CHMOD change detected, skipping")
continue
}
if event.Op&fsnotify.Write == fsnotify.Write {
w.log("WRITE event detected, skipping")
continue
}

if time.Since(w.lastCmdStart) < time.Duration(w.config.Delay)*time.Millisecond {
w.log("Last command started less than the configured delay, skipping", "delay", w.config.Delay)
Expand Down

0 comments on commit 8be47db

Please sign in to comment.