From a3b6c3ec266ca585c452df69cd9dcb671f0b2b25 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Mon, 21 Sep 2015 10:49:41 +0100 Subject: [PATCH] fix: allows user to not watch Fixes #516 --- lib/config/load.js | 2 +- lib/monitor/run.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/config/load.js b/lib/config/load.js index 5d22241..25a1b7f 100644 --- a/lib/config/load.js +++ b/lib/config/load.js @@ -137,7 +137,7 @@ function normaliseRules(options, ready) { rules.ignore.add(options.ignore); // normalise the watch and ignore arrays - options.watch = rules.rules.watch; + options.watch = options.watch === false ? false : rules.rules.watch; options.ignore = rules.rules.ignore; ready(options); diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 988e7e9..d45aed7 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -237,8 +237,10 @@ function run(options) { }); } - debug('about to watch'); - watch(); + debug('start watch on: %s', config.options.watch); + if (config.options.watch !== false) { + watch(); + } } function kill(child, signal, callback) {