From 886527f1f0a9249e1a044fd652b7519d1c0dc50e 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..4c74d338 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) && // 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