Skip to content

Commit

Permalink
feat: disable chokidar globbing on windows (#1140)
Browse files Browse the repository at this point in the history
Fixes a range of issues, including:

Fixes #1115

* refactor: use Object.assign in place of merge (this will leak to more work)

Since we're now supporting 6 upwards
  • Loading branch information
remy committed Dec 4, 2017
1 parent 6d57dac commit 24a4b84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ module.exports = {
// but also includes stderr. If this is false, data is still dispatched via
// nodemon.on('stdout/stderr')
stdout: true,
watchOptions: {

},
};
8 changes: 7 additions & 1 deletion lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ function watch() {
interval: config.options.pollingInterval,
};

if (utils.isWindows) {
watchOptions.disableGlobbing = true;
}

if (process.env.TEST) {
watchOptions.useFsEvents = false;
}

var watcher = chokidar.watch(dir, watchOptions);
var watcher = chokidar.watch(dir,
Object.assign({}, watchOptions, config.watchOptions || {})
);

watcher.ready = false;

Expand Down

0 comments on commit 24a4b84

Please sign in to comment.