Skip to content

Commit

Permalink
Ignore watching /dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work committed Jan 8, 2025
1 parent 9880094 commit a1469fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ func (watch *watch) add(paths map[string]bool) {
}

for path := range paths {
watch.watcher.Add(path)
// ignore /dev since write updates to /dev/tty causes high cpu usage
if path != "/dev" {
watch.watcher.Add(path)
}
}
}

Expand Down

0 comments on commit a1469fa

Please sign in to comment.