Skip to content

Commit

Permalink
fix(nx-cloud): fix nx connect throwing if run twice (#19729)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Oct 19, 2023
1 parent 879436f commit 0418708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nx/src/utils/nx-cloud-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function getNxCloudToken(nxJson: NxJsonConfiguration): string {
);

if (!cloudRunner && !nxJson.nxCloudAccessToken)
throw new Error('nx-cloud runner not find in nx.json');
throw new Error('nx-cloud runner not found in nx.json');

return cloudRunner.options.accessToken ?? nxJson.nxCloudAccessToken;
return cloudRunner?.options.accessToken ?? nxJson.nxCloudAccessToken;
}

0 comments on commit 0418708

Please sign in to comment.