Skip to content

Commit

Permalink
lib: use spread operator on cluster
Browse files Browse the repository at this point in the history
PR-URL: #32125
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
himself65 authored and targos committed Apr 22, 2020
1 parent 914eddd commit 5a67177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/cluster/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cluster.setupMaster = function(options) {
// process has its own memory mappings.)
if (settings.execArgv.some((s) => s.startsWith('--prof')) &&
!settings.execArgv.some((s) => s.startsWith('--logfile='))) {
settings.execArgv = settings.execArgv.concat(['--logfile=v8-%p.log']);
settings.execArgv = [...settings.execArgv, '--logfile=v8-%p.log'];
}

cluster.settings = settings;
Expand Down Expand Up @@ -104,7 +104,7 @@ function setupSettingsNT(settings) {

function createWorkerProcess(id, env) {
const workerEnv = { ...process.env, ...env, NODE_UNIQUE_ID: `${id}` };
const execArgv = cluster.settings.execArgv.slice();
const execArgv = [...cluster.settings.execArgv];
const debugArgRegex = /--inspect(?:-brk|-port)?|--debug-port/;
const nodeOptions = process.env.NODE_OPTIONS ?
process.env.NODE_OPTIONS : '';
Expand Down

0 comments on commit 5a67177

Please sign in to comment.