[cli/clustering] resolve our paths relative to root, not CWD

This commit is contained in:
spalger 2016-03-07 13:48:45 -07:00
parent 32f6667e3d
commit befe5f30d8

View file

@ -85,14 +85,17 @@ module.exports = class ClusterManager {
const chokidar = require('chokidar'); const chokidar = require('chokidar');
const fromRoot = require('../../utils/fromRoot'); const fromRoot = require('../../utils/fromRoot');
const watchPaths = uniq([ const watchPaths = uniq(
'src/plugins', [
'src/server', fromRoot('src/plugins'),
'src/ui', fromRoot('src/server'),
'src/utils', fromRoot('src/ui'),
'config', fromRoot('src/utils'),
...extraPaths fromRoot('config'),
].map(path => resolve(path))); ...extraPaths
]
.map(path => resolve(path))
);
this.watcher = chokidar.watch(watchPaths, { this.watcher = chokidar.watch(watchPaths, {
cwd: fromRoot('.'), cwd: fromRoot('.'),