Skip to content

Commit

Permalink
fix(angular): fix builder/executor resolution in ngcli-adapter (#20307)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Nov 17, 2023
1 parent e4f6be2 commit 4dfc18f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/nx/src/adapter/ngcli-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,14 @@ async function getWrappedWorkspaceNodeModulesArchitectHost(
builderName
);
const builderInfo = this.readExecutor(packageName, builderName);
const { builders, executors } =
readJsonFile<ExecutorsJson>(executorsFilePath);
return {
name: builderStr,
builderName,
description:
readJsonFile<ExecutorsJson>(executorsFilePath).builders[builderName]
.description,
builders?.[builderName]?.description ??
executors?.[builderName]?.description,
optionSchema: builderInfo.schema,
import: resolveImplementation(
executorConfig.implementation,
Expand Down Expand Up @@ -1128,7 +1130,8 @@ async function getWrappedWorkspaceNodeModulesArchitectHost(
batchImplementation?: string;
schema: string;
hasher?: string;
} = executorsJson.builders?.[builder];
} =
executorsJson.builders?.[builder] ?? executorsJson.executors?.[builder];
if (!executorConfig) {
throw new Error(
`Cannot find builder '${builder}' in ${executorsFilePath}.`
Expand Down

0 comments on commit 4dfc18f

Please sign in to comment.