[cli/clustering] resolve our paths relative to root, not CWD
This commit is contained in:
parent
32f6667e3d
commit
befe5f30d8
|
@ -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('.'),
|
||||||
|
|
Loading…
Reference in a new issue