From a6a81cfc33d473f5896b6e4ecd118c0a35d3517c Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Thu, 17 Oct 2024 14:53:01 -0600 Subject: [PATCH] fix(core): neverConnectToCloud should disable connecting to nxCloud (#28501) closed #28482, #28486 ## Current Behavior If, `neverConnectToCloud` is set to `true`, there are still attempts made to connect to NxCloud. ## Expected Behavior if, `neverConnectToCloud` is set to `true`, we should not attempt to connect to NxCloud. ## Related Issue(s) Fixes # --- packages/nx/src/utils/nx-cloud-utils.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/nx/src/utils/nx-cloud-utils.ts b/packages/nx/src/utils/nx-cloud-utils.ts index e0db798d57817..5b33d7435ec07 100644 --- a/packages/nx/src/utils/nx-cloud-utils.ts +++ b/packages/nx/src/utils/nx-cloud-utils.ts @@ -1,14 +1,10 @@ import { NxJsonConfiguration } from '../config/nx-json'; export function isNxCloudUsed(nxJson: NxJsonConfiguration): boolean { - if (process.env.NX_NO_CLOUD === 'true') { + if (process.env.NX_NO_CLOUD === 'true' || nxJson.neverConnectToCloud) { return false; } - if (nxJson.neverConnectToCloud) { - return true; - } - return ( !!process.env.NX_CLOUD_ACCESS_TOKEN || !!nxJson.nxCloudAccessToken ||