Skip to content

Commit

Permalink
fix(@angular/cli): resolve external schematics from workspace root
Browse files Browse the repository at this point in the history
Resolve schematics collections from the workspace root, as otherwise it will be resolved from the temporary installed CLI version

Closes #18083
  • Loading branch information
alan-agius4 authored and mgechev committed Jul 1, 2020
1 parent c9f5304 commit f51cde7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/angular/cli/commands/update-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
for (const migration of migrations) {
const result = await this.executeMigrations(
migration.package,
migration.collection,
// Resolve the collection from the workspace root, as otherwise it will be resolved from the temp
// installed CLI version.
require.resolve(migration.collection, { paths: [this.workspace.root] }),
new semver.Range('>' + migration.from + ' <=' + migration.to),
options.createCommits,
);
Expand Down

0 comments on commit f51cde7

Please sign in to comment.