Skip to content

Commit ceb057e

Browse files
committed
fix(@angular/cli): correctly access root workspace path
(cherry picked from commit ae04726)
1 parent d6ba30b commit ceb057e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/angular/cli/commands/add-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class AddCommand extends SchematicCommand<AddCommandSchema> {
3838
}
3939

4040
async run(options: AddCommandSchema & Arguments) {
41-
await ensureCompatibleNpm(this.context.root);
41+
await ensureCompatibleNpm(this.workspace.root);
4242

4343
if (!options.collection) {
4444
this.logger.fatal(

packages/angular/cli/commands/new-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class NewCommand extends SchematicCommand<NewCommandSchema> {
2222
}
2323

2424
public async run(options: NewCommandSchema & Arguments) {
25-
await ensureCompatibleNpm(this.context.root);
25+
await ensureCompatibleNpm(this.workspace.root);
2626

2727
// Register the version of the CLI in the registry.
2828
const packageJson = require('../package.json');

packages/angular/cli/commands/update-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
256256

257257
// tslint:disable-next-line:no-big-function
258258
async run(options: UpdateCommandSchema & Arguments) {
259-
await ensureCompatibleNpm(this.context.root);
259+
await ensureCompatibleNpm(this.workspace.root);
260260

261261
// Check if the @angular-devkit/schematics package can be resolved from the workspace root
262262
// This works around issues with packages containing migrations that cannot directly depend on the package

0 commit comments

Comments
 (0)