Skip to content

Commit

Permalink
fix(nx-cloud): fix connect generator (#27314)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

The generators is broken when run directly with `nx g
connect-to-nx-cloud`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The generator is not broken when running it directly via `nx g
connect-to-nx-cloud`

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit bbd4dad)
  • Loading branch information
FrozenPandaz committed Aug 7, 2024
1 parent 2364232 commit a42a84d
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface ConnectToNxCloudOptions {
function addNxCloudOptionsToNxJson(
tree: Tree,
token: string,
directory: string = tree.root
directory: string = ''
) {
const nxJsonPath = join(directory, 'nx.json');
if (tree.exists(nxJsonPath)) {
Expand Down Expand Up @@ -173,4 +173,11 @@ export async function connectToNxCloud(
}
}

export default connectToNxCloud;
async function connectToNxCloudGenerator(
tree: Tree,
options: ConnectToNxCloudOptions
) {
await connectToNxCloud(tree, options);
}

export default connectToNxCloudGenerator;

0 comments on commit a42a84d

Please sign in to comment.