Skip to content

Commit

Permalink
fix(@angular-devkit/architect): provide better error when builder is …
Browse files Browse the repository at this point in the history
…not defined

When a builder is not defined a more actionable error message is now displayed.

Closes angular#29226
  • Loading branch information
alan-agius4 committed Jan 6, 2025
1 parent c40d726 commit bfa5167
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost<NodeModu
this.workspaceHost = {
async getBuilderName(project, target) {
const targetDefinition = findProjectTarget(workspaceOrHost, project, target);
if (!targetDefinition.builder) {
throw new Error(`A builder is not set for target '${target}' in project '${project}'.`);
}

return targetDefinition.builder;
},
Expand Down

0 comments on commit bfa5167

Please sign in to comment.