From 10190bf8e5eaf148d4fb3fd91aaa4d2316204e6a Mon Sep 17 00:00:00 2001 From: pankaj443 Date: Thu, 5 Dec 2024 14:53:47 +0530 Subject: [PATCH] Add override for CircleCI node total --- packages/env/src/environment.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/env/src/environment.js b/packages/env/src/environment.js index 325a4d17c..a99e4d331 100644 --- a/packages/env/src/environment.js +++ b/packages/env/src/environment.js @@ -212,13 +212,15 @@ export class PercyEnv { // parallel total & nonce get parallel() { let total = parseInt(this.vars.PERCY_PARALLEL_TOTAL, 10); + if (!Number.isInteger(total)) total = null; - if (this.ci === 'circle') { - total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10); + if (total === null) { + switch (this.ci) { + case 'circle': + total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10); + } } - if (!Number.isInteger(total)) total = null; - // no nonce if no total let nonce = total && (() => { if (this.vars.PERCY_PARALLEL_NONCE) {