Skip to content

Commit 295bc83

Browse files
kyubisationfilipesilva
authored andcommitted
fix(@angular/cli): correctly read transitive dependency
For `ng update --migrateOnly ...` the update implementation checks for transitive dependencies and tries to parse the containing directory as JSON. This PR fixes this by providing the correct path to the package.json.
1 parent 23b4655 commit 295bc83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
439439
const packageJson = findPackageJson(this.context.root, packageName);
440440
if (packageJson) {
441441
packagePath = path.dirname(packageJson);
442-
packageNode = await readPackageJson(packagePath);
442+
packageNode = await readPackageJson(packageJson);
443443
}
444444
}
445445

0 commit comments

Comments
 (0)