From ba5f128fa7014fbd5219dc633119304c72c8c7fb Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Tue, 15 Oct 2024 14:53:50 -0400 Subject: [PATCH] fix(core): handle `neverConnectToCloud` property (#28452) ## Current Behavior `neverConnectToCloud` was not respected in the `isNxCloudUsed` function ## Expected Behavior `neverConnectToCloud` is now respected ## Related Issue(s) Fixes #28287 --- packages/nx/src/utils/nx-cloud-utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nx/src/utils/nx-cloud-utils.ts b/packages/nx/src/utils/nx-cloud-utils.ts index 297ef8a1735dc..e0db798d57817 100644 --- a/packages/nx/src/utils/nx-cloud-utils.ts +++ b/packages/nx/src/utils/nx-cloud-utils.ts @@ -5,6 +5,10 @@ export function isNxCloudUsed(nxJson: NxJsonConfiguration): boolean { return false; } + if (nxJson.neverConnectToCloud) { + return true; + } + return ( !!process.env.NX_CLOUD_ACCESS_TOKEN || !!nxJson.nxCloudAccessToken ||