Skip to content

Commit 0d9a892

Browse files
committed
fix: don't use fork with node inspect
Fixes: #1191
1 parent de66c6b commit 0d9a892

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/monitor/run.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ function run(options) {
7878
});
7979
}
8080

81+
const firstArg = cmd.args[0] || '';
82+
8183
if (
8284
// this is a hack to avoid forking if there's a node argument being passed
8385
// it's a short term fix, and I'm not 100% sure that `fork` is the right way
84-
(cmd.args[0] || '').indexOf('-') === -1 &&
86+
firstArg.indexOf('-') === -1 &&
87+
firstArg !== 'inspect' &&
8588
executable === 'node' &&
8689
utils.version.major > 4
8790
) {

0 commit comments

Comments
 (0)