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 <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
himself65 authored and MylesBorins committed Mar 24, 2020
1 parent 08edf53 commit 435341a
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 @@ -66,7 +66,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 @@ -103,7 +103,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 435341a

Please sign in to comment.