Skip to content

Commit

Permalink
fix(core): fix missing nxCloud error message on ci workflows (#21564)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Feb 2, 2024
1 parent 90d0453 commit bc6e58f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ CI:
"
`;

exports[`CI Workflow generator with npm should throw error is nx cloud is not set 1`] = `"nx-cloud runner not found in nx.json"`;
exports[`CI Workflow generator with npm should throw error is nx cloud is not set 1`] = `"This workspace is not connected to Nx Cloud."`;

exports[`CI Workflow generator with pnpm should generate azure CI config 1`] = `
"name: CI
Expand Down Expand Up @@ -407,7 +407,7 @@ CI:
"
`;

exports[`CI Workflow generator with pnpm should throw error is nx cloud is not set 1`] = `"nx-cloud runner not found in nx.json"`;
exports[`CI Workflow generator with pnpm should throw error is nx cloud is not set 1`] = `"This workspace is not connected to Nx Cloud."`;

exports[`CI Workflow generator with yarn should generate azure CI config 1`] = `
"name: CI
Expand Down Expand Up @@ -604,4 +604,4 @@ CI:
"
`;

exports[`CI Workflow generator with yarn should throw error is nx cloud is not set 1`] = `"nx-cloud runner not found in nx.json"`;
exports[`CI Workflow generator with yarn should throw error is nx cloud is not set 1`] = `"This workspace is not connected to Nx Cloud."`;
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export interface Schema {

export async function ciWorkflowGenerator(tree: Tree, schema: Schema) {
const ci = schema.ci;
const options = normalizeOptions(schema, tree);

const nxJson: NxJsonConfiguration = readJson(tree, 'nx.json');
const nxCloudUsed =
Expand All @@ -36,6 +35,7 @@ export async function ciWorkflowGenerator(tree: Tree, schema: Schema) {
writeJson(tree, 'nx.json', appendOriginPrefix(nxJson));
}

const options = normalizeOptions(schema, tree);
generateFiles(tree, join(__dirname, 'files', ci), '', options);
await formatFiles(tree);
}
Expand Down

0 comments on commit bc6e58f

Please sign in to comment.