Skip to content

Commit

Permalink
fix: sniff for child.stdout before using it
Browse files Browse the repository at this point in the history
This fixes node@6.0.0, but it's a hack, so I'm going to emit a message
saying that non-LTS is not supported.
  • Loading branch information
remy committed Feb 1, 2018
1 parent 4f0562a commit 79e61f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/monitor/run.js
Expand Up @@ -260,7 +260,12 @@ function run(options) {
child.stdin.on('error', () => { });
process.stdin.pipe(child.stdin);
} else {
child.stdout.pipe(process.stdout);
if (child.stdout) {
child.stdout.pipe(process.stdout);
} else {
utils.log.error(`running an unsupported version of node ${process.version}`);
utils.log.error('nodemon may not work as expected - please consider upgrading to LTS');
}
}

bus.once('exit', function () {
Expand Down

0 comments on commit 79e61f0

Please sign in to comment.