mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
fixed #289. setTimeout to the rescue?
This commit is contained in:
@@ -115,7 +115,14 @@ function run(options) {
|
||||
if (process.stdin.unpipe) { // node > 0.8
|
||||
process.stdin.unpipe(child.stdin);
|
||||
}
|
||||
child.stdin.end();
|
||||
|
||||
// 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
|
||||
// stdin after we close, so doing it on nextTick ala setTimeout(0)
|
||||
// seems to fix it.
|
||||
process.nextTick(function () {
|
||||
child.stdin.end();
|
||||
});
|
||||
}
|
||||
|
||||
// When using CoffeeScript under Windows, child's process is not node.exe
|
||||
|
||||
@@ -222,6 +222,9 @@ if (!config.required) {
|
||||
console.error('exception in nodemon killing node');
|
||||
console.error(err.stack);
|
||||
console.error();
|
||||
console.error('node: ' + process.version);
|
||||
console.error('command: ' + process.argv.join(' '));
|
||||
console.error();
|
||||
console.error('If appropriate, please file an error: http://github.com/remy/nodemon/issues/new\n');
|
||||
if (!config.required) {
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user