diff --git a/lib/index.js b/lib/index.js index 75dac54..1bab526 100644 --- a/lib/index.js +++ b/lib/index.js @@ -65,10 +65,11 @@ module.exports = function ( let child; watcher.on('change', file => { + if (isPaused) return; + isPaused = true; clearOutput(); notify('Restarting', `${file} has been modified`); - watcher.removeAll(); - isPaused = true; + watcher.removeAll(); if (child) { // Child is still running, restart upon exit child.on('exit', start);