Skip to content

Commit 8a86f2d

Browse files
committed
fix: disable fork only if string starts with dash
fixes remy#1554
1 parent aa41ab2 commit 8a86f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/monitor/run.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function run(options) {
9191
const shouldFork =
9292
!config.options.spawn &&
9393
!inBinPath &&
94-
firstArg.indexOf('-') === -1 && // don't fork if there's a node exec arg
94+
!(firstArg.indexOf('-') === 0) && // don't fork if there's a node exec arg
9595
firstArg !== 'inspect' && // don't fork it's `inspect` debugger
9696
executable === 'node' && // only fork if node
9797
utils.version.major > 4 // only fork if node version > 4

0 commit comments

Comments
 (0)