mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
Fixes #352
The find method wasn't known when it tries to add the directories to monitor. This change fixes that
This commit is contained in:
@@ -57,13 +57,6 @@ config.load = function (settings, ready) {
|
||||
options.watch.push('*.*');
|
||||
}
|
||||
|
||||
options.monitor = rulesToMonitor(options.watch, options.ignore, config);
|
||||
|
||||
var cwd = process.cwd();
|
||||
if (config.dirs.length === 0) {
|
||||
config.dirs.unshift(cwd);
|
||||
}
|
||||
|
||||
var cmd = command(config.options);
|
||||
config.command = {
|
||||
raw: cmd,
|
||||
@@ -72,6 +65,13 @@ config.load = function (settings, ready) {
|
||||
|
||||
// now run automatic checks on system adding to the config object
|
||||
checkWatchSupport(config, function (config) {
|
||||
options.monitor = rulesToMonitor(options.watch, options.ignore, config);
|
||||
|
||||
var cwd = process.cwd();
|
||||
if (config.dirs.length === 0) {
|
||||
config.dirs.unshift(cwd);
|
||||
}
|
||||
|
||||
if (config.system.useFind === false && config.system.useWatch === false) {
|
||||
config.system.useWatchFile = true;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ function rulesToMonitor(watch, ignore, config) {
|
||||
// narrowing down otherwise it tries to find on the entire drive...which
|
||||
// is a bit batty.
|
||||
// `!not` ... sorry.
|
||||
if (utils.isMac && !not) {
|
||||
if (config.system.useFind && !not) {
|
||||
config.dirs.push(dir);
|
||||
}
|
||||
} else {
|
||||
@@ -77,7 +77,7 @@ function rulesToMonitor(watch, ignore, config) {
|
||||
}
|
||||
} catch (e) {
|
||||
var base = tryBaseDir(dir);
|
||||
if (utils.isMac && !not && base) {
|
||||
if (config.system.useFind && !not && base) {
|
||||
if (config.dirs.indexOf(base) === -1) {
|
||||
config.dirs.push(base);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ module.exports = function () {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
config.offset = offset;
|
||||
|
||||
return offset;
|
||||
};
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ function run(options) {
|
||||
|
||||
/* Now kill the entire subtree of processes belonging to nodemon */
|
||||
var oldPid = child.pid;
|
||||
if (child) { // sometimes (when?!?) the child wonders off
|
||||
if (child) {
|
||||
kill(child, 'SIGUSR2', function () {
|
||||
// this seems to fix the 0.11.x issue with the "rs" restart command,
|
||||
// though I'm unsure why. it seems like more data is streamed in to
|
||||
|
||||
Reference in New Issue
Block a user