Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@schematics/angular): undefined is used as newProjectRoot when no… #13704

Merged
merged 1 commit into from
Feb 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(@schematics/angular): undefined is used as newProjectRoot when no…
…ne is set

Fixes #13703
ahasall committed Feb 18, 2019
commit 7cd013c7f74eb70f26c042e8cdce95688f8c87fe
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
@@ -324,7 +324,7 @@ export default function (options: ApplicationOptions): Rule {
};

const workspace = getWorkspace(host);
let newProjectRoot = workspace.newProjectRoot;
let newProjectRoot = workspace.newProjectRoot || 'projects';
let appDir = `${newProjectRoot}/${options.name}`;
let sourceRoot = `${appDir}/src`;
let sourceDir = `${sourceRoot}/app`;
2 changes: 1 addition & 1 deletion packages/schematics/angular/library/index.ts
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ export default function (options: LibraryOptions): Rule {
}

const workspace = getWorkspace(host);
const newProjectRoot = workspace.newProjectRoot;
const newProjectRoot = workspace.newProjectRoot || 'projects';

const scopeFolder = scopeName ? strings.dasherize(scopeName) + '/' : '';
const folderName = `${scopeFolder}${strings.dasherize(options.name)}`;