Skip to content

Commit 79e61f0

Browse files
committed
fix: sniff for child.stdout before using it
This fixes [email protected], but it's a hack, so I'm going to emit a message saying that non-LTS is not supported.
1 parent 4f0562a commit 79e61f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/monitor/run.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,12 @@ function run(options) {
260260
child.stdin.on('error', () => { });
261261
process.stdin.pipe(child.stdin);
262262
} else {
263-
child.stdout.pipe(process.stdout);
263+
if (child.stdout) {
264+
child.stdout.pipe(process.stdout);
265+
} else {
266+
utils.log.error(`running an unsupported version of node ${process.version}`);
267+
utils.log.error('nodemon may not work as expected - please consider upgrading to LTS');
268+
}
264269
}
265270

266271
bus.once('exit', function () {

0 commit comments

Comments
 (0)