diff options
author | himself65 <himself65@outlook.com> | 2020-03-06 15:52:34 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-12 18:58:08 +0300 |
commit | 12845a8bd1a71f2cf26ae43adef76353dabd09b9 (patch) | |
tree | c27b02d52f39a6f6bb3c2a766874cc70962806ff /lib/internal/cluster | |
parent | 7fcb8da777e274bb174889ff930b17740d75594e (diff) |
lib: use spread operator on cluster
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'lib/internal/cluster')
-rw-r--r-- | lib/internal/cluster/master.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 46c77900f42..dc8efc1f98e 100644 --- a/lib/internal/cluster/master.js +++ b/lib/internal/cluster/master.js @@ -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; @@ -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 : ''; |