draft-classic
draft-classic copied to clipboard
`draft up` with watch enabled not working on Linux
With 2 terminals open, I can't seem to get draft up to work for me. It doesn't look like it's watching the local filesystem for changes.
$ touch hi
In the other terminal, nothing happens.
...
Watching local files for changes...
It turned out that my machine was out of inotify watches, so it was a matter of bumping this up to a higher number and it worked once more.
$ sudo apt-get install inotify-tools
$ inotifywait -rme modify,attrib,move,close_write,create,delete,delete_self /tmp/watcher-test/
Setting up watches. Beware: since -r was given, this may take a while!
Failed to watch /tmp/watcher-test/; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
Bumping from the default 8192 to 16384 fixes the underlying issue, so the root issue here is that it seems like the notify library will not tell you if you're out of watchers, as described in https://github.com/rjeczalik/notify/issues/109.