Skip to content
Snippets Groups Projects
Commit 20cae108 authored by Jakob Moosbrugger's avatar Jakob Moosbrugger
Browse files

option to disable redirection

parent 3fd62672
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ var Worker = function () {
return (/(debug|inspect)/.test(execArg)
);
});
if (debugVars.length > 0) {
if (debugVars.length > 0 && !options.noDebugRedirection) {
if (!options.execArgv) {
//if no execArgs are given copy all arguments
debugVars = process.execArgv;
......@@ -69,6 +69,8 @@ var Worker = function () {
options.execArgv = options.execArgv.concat(debugVars);
}
delete options.noDebugRedirection;
this.child = fork(worker, args, options);
this.onerror = undefined;
this.onmessage = undefined;
......
......@@ -17,7 +17,7 @@ class Worker {
var debugVars = process.execArgv.filter(execArg => {
return (/(debug|inspect)/).test(execArg);
});
if (debugVars.length > 0) {
if (debugVars.length > 0 && !options.noDebugRedirection) {
if (!options.execArgv) { //if no execArgs are given copy all arguments
debugVars = process.execArgv;
options.execArgv = [];
......@@ -50,6 +50,8 @@ class Worker {
}
delete options.noDebugRedirection;
this.child = fork(worker, args, options);
this.onerror = undefined;
this.onmessage = undefined;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment