diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 23b5106a..058512b4 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -86,7 +86,7 @@ function run(options) { if ( // this is a hack to avoid forking if there's a node argument being passed // it's a short term fix, and I'm not 100% sure that `fork` is the right way - cmd.args[0].indexOf('-') === -1 && + (cmd.args[0] || '').indexOf('-') === -1 && executable === 'node' && utils.version.major > 4 ) {