1
0
Fork 0
forked from svrjs/svrjs

Replace Object.assign for arrays with spread operator.

This commit is contained in:
Dorian Niemiec 2024-08-27 21:14:58 +02:00
parent b3cd8d699d
commit 189fbdc617

View file

@ -90,7 +90,7 @@ if (!process.singleThreaded) {
const child_process = require("child_process"); const child_process = require("child_process");
let newEnvironment = Object.assign({}, env ? env : process.env); let newEnvironment = Object.assign({}, env ? env : process.env);
newEnvironment.NODE_UNIQUE_ID = cluster._workersCounter; newEnvironment.NODE_UNIQUE_ID = cluster._workersCounter;
let newArguments = Object.assign([], process.argv); let newArguments = [...process.argv];
let command = newArguments.shift(); let command = newArguments.shift();
let newWorker = child_process.spawn(command, newArguments, { let newWorker = child_process.spawn(command, newArguments, {
env: newEnvironment, env: newEnvironment,