From 7d47169e96d9c3e8264770d07748080073c9d86a Mon Sep 17 00:00:00 2001 From: Pankaj Yadav Date: Thu, 5 Dec 2024 15:04:30 +0530 Subject: [PATCH] Add override for CircleCI node total (#1812) --- 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) {