Skip to content

Commit 0330a49

Browse files
clydinhansl
authored andcommitted
fix(@angular/cli): check CWD for current project name
1 parent 2d34128 commit 0330a49

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

package-lock.json

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ export abstract class SchematicCommand extends Command {
118118

119119
workflow.registry.addSmartDefaultProvider('projectName', (_schema: JsonObject) => {
120120
if (this._workspace) {
121-
return this._workspace.getDefaultProjectName();
121+
return this._workspace.getProjectByPath(normalize(process.cwd()))
122+
|| this._workspace.getDefaultProjectName();
122123
}
123124
return undefined;
124125
});

0 commit comments

Comments
 (0)