Skip to content

Commit c03cfd8

Browse files
committed
fix(@angular/cli): Add smart default provider for default project
1 parent 0bd1f61 commit c03cfd8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/@angular/cli/models/schematic-command.ts

+7
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ export abstract class SchematicCommand extends Command {
116116
});
117117
delete schematicOptions._;
118118

119+
workflow.registry.addSmartDefaultProvider('projectName', (_schema: JsonObject) => {
120+
if (this._workspace) {
121+
return this._workspace.getDefaultProjectName();
122+
}
123+
return undefined;
124+
});
125+
119126
workflow.reporter.subscribe((event: DryRunEvent) => {
120127
nothingDone = false;
121128

0 commit comments

Comments
 (0)