Skip to content

Commit

Permalink
fix(core): ensure connect-to-nx-cloud works with lerna workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Dec 21, 2023
1 parent 029f73d commit 0df9085
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function addNxCloudOptionsToNxJson(
nxJson: NxJsonConfiguration,
token: string
) {
nxJson ??= {};
nxJson.nxCloudAccessToken = token;
const overrideUrl = process.env.NX_CLOUD_API || process.env.NRWL_API;
if (overrideUrl) {
Expand All @@ -114,9 +115,11 @@ export async function connectToNxCloud(
tree: Tree,
schema: ConnectToNxCloudOptions
) {
const nxJson = readNxJson(tree);
const nxJson = readNxJson(tree) as
| null
| (NxJsonConfiguration & { neverConnectToCloud: boolean });

if ((nxJson as any).neverConnectToCloud) {
if (nxJson?.neverConnectToCloud) {
return () => {
printCloudConnectionDisabledMessage();
};
Expand Down

0 comments on commit 0df9085

Please sign in to comment.