e.g. if you touch $'a\nb' in a watched directory you get
Error: SyntaxError: Unexpected end of JSON input -> { "type": "OPEN", "file": "/tmp/thing/a
at /tmp/in/node_modules/inotifywait/lib/inotifywait.js:85:32
at /tmp/in/node_modules/lazy/lazy.js:99:35
at Lazy.<anonymous> (/tmp/in/node_modules/lazy/lazy.js:74:37)
at Lazy.emit (events.js:315:20)
at Lazy.EventEmitter.emit (domain.js:506:15)
at Lazy.<anonymous> (/tmp/in/node_modules/lazy/lazy.js:74:22)
at Lazy.emit (events.js:315:20)
at Lazy.EventEmitter.emit (domain.js:506:15)
at yieldTo (/tmp/in/node_modules/lazy/lazy.js:181:18)
You need to use the csv output option from inotifywait and parse that.
e.g. if you
touch $'a\nb'
in a watched directory you getYou need to use the csv output option from inotifywait and parse that.