Skip to content

Commit 5554506

Browse files
jelbournmmalerba
authored andcommitted
fix(schematics): ignore e2e projects w/ ng add (#10883)
1 parent 4d23b08 commit 5554506

File tree

1 file changed

+3
-1
lines changed
  • src/lib/schematics/utils/devkit-utils

1 file changed

+3
-1
lines changed

src/lib/schematics/utils/devkit-utils/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ export function getProjectFromWorkspace(config: Workspace, projectName?: string)
102102
return project;
103103
}
104104

105-
const allProjectNames = Object.keys(config.projects);
105+
// If there is exactly one non-e2e project, use that. Otherwise, require that a specific
106+
// project be specified.
107+
const allProjectNames = Object.keys(config.projects).filter(p => !p.includes('e2e'));
106108
if (allProjectNames.length === 1) {
107109
const project = config.projects[allProjectNames[0]];
108110
// Set a non-enumerable project name to the project. We need the name for schematics

0 commit comments

Comments
 (0)