From 189fbdc617992c52af4b0e9a97f6f1e5fcad45e6 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 27 Aug 2024 21:14:58 +0200 Subject: [PATCH] Replace Object.assign for arrays with spread operator. --- src/utils/clusterBunShim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/clusterBunShim.js b/src/utils/clusterBunShim.js index 0734f6c..642d94e 100644 --- a/src/utils/clusterBunShim.js +++ b/src/utils/clusterBunShim.js @@ -90,7 +90,7 @@ if (!process.singleThreaded) { const child_process = require("child_process"); let newEnvironment = Object.assign({}, env ? env : process.env); newEnvironment.NODE_UNIQUE_ID = cluster._workersCounter; - let newArguments = Object.assign([], process.argv); + let newArguments = [...process.argv]; let command = newArguments.shift(); let newWorker = child_process.spawn(command, newArguments, { env: newEnvironment,