diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 7b67b705..23b5106a 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -83,7 +83,13 @@ function run(options) { }); } - if (executable === 'node' && utils.version.major > 4) { + 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 && + executable === 'node' && + utils.version.major > 4 + ) { var forkArgs = cmd.args.slice(1); var env = utils.merge(options.execOptions.env, process.env); stdio.push('ipc');