Skip to content

Commit

Permalink
Make ManifestBuilder compatible with --experimental_sibling_repositor…
Browse files Browse the repository at this point in the history
…y_layout.

PiperOrigin-RevId: 340842436
  • Loading branch information
Googler authored and copybara-github committed Nov 5, 2020
1 parent b38680a commit ffdda7d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public Map<PathFragment, Artifact> build() {
}

private PathFragment getExternalPath(PathFragment path) {
return checkForWorkspace(path.relativeTo(LabelConstants.EXTERNAL_PACKAGE_NAME));
return checkForWorkspace(path.subFragment(1));
}

private PathFragment checkForWorkspace(PathFragment path) {
Expand All @@ -498,7 +498,8 @@ private PathFragment checkForWorkspace(PathFragment path) {
}

private static boolean isUnderWorkspace(PathFragment path) {
return !path.startsWith(LabelConstants.EXTERNAL_PACKAGE_NAME);
return !path.startsWith(LabelConstants.EXTERNAL_PATH_PREFIX)
&& !path.startsWith(LabelConstants.EXPERIMENTAL_EXTERNAL_PATH_PREFIX);
}
}

Expand Down

0 comments on commit ffdda7d

Please sign in to comment.