From a0d47ef4eebeee67341e70559e96a04198b82055 Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Tue, 23 Apr 2019 12:38:28 -0700 Subject: [PATCH] fix: disable fork only if string starts with dash fixes #1554 --- lib/monitor/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index e316c2b1..558b3c3d 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -91,7 +91,7 @@ function run(options) { const shouldFork = !config.options.spawn && !inBinPath && - firstArg.indexOf('-') === -1 && // don't fork if there's a node exec arg + !(firstArg.indexOf('-') === 0) === -1 && // don't fork if there's a node exec arg firstArg !== 'inspect' && // don't fork it's `inspect` debugger executable === 'node' && // only fork if node utils.version.major > 4 // only fork if node version > 4