diff --git a/lib/src/package.dart b/lib/src/package.dart index 1d8dc4279..e29088997 100644 --- a/lib/src/package.dart +++ b/lib/src/package.dart @@ -513,7 +513,10 @@ Package `$override` at `${overriddenWorkspacePackage.presentationDir}` is overri // By adding this to visited we will never go above the workspaceRoot.dir. p.canonicalize(root.dir), }; - for (final package in root.transitiveWorkspace.skip(1)) { + for (final package in root.transitiveWorkspace + // We don't want to look at the roots parents. The first package is always + // the root, so skip that. + .skip(1)) { // Run through all parent directories until we meet another workspace // package. for (final dir in parentDirs(package.dir).skip(1)) {