Skip to content

Commit

Permalink
fix: don't use fork with node inspect
Browse files Browse the repository at this point in the history
Fixes: #1191
  • Loading branch information
remy committed Dec 29, 2017
1 parent de66c6b commit 0d9a892
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/monitor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ function run(options) {
});
}

const firstArg = cmd.args[0] || '';

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 &&
firstArg.indexOf('-') === -1 &&
firstArg !== 'inspect' &&
executable === 'node' &&
utils.version.major > 4
) {
Expand Down

0 comments on commit 0d9a892

Please sign in to comment.