Skip to content

Commit

Permalink
Support using %workspace% in registry URL
Browse files Browse the repository at this point in the history
%workspace% in the URL will be replaced with the current workspace root
  • Loading branch information
meteorcloudy committed May 17, 2021
1 parent c660ce5 commit 3ee4868
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ private Optional<GetModuleFileResult> getModuleFile(ModuleKey key, StarlarkOverr
ImmutableList.Builder<Registry> registryObjects = new ImmutableList.Builder<>();
for (String registryUrl : registries) {
try {
registryObjects.add(registryFactory.getRegistryWithUrl(registryUrl));
registryObjects.add(registryFactory.getRegistryWithUrl(
registryUrl.replace("%workspace%", workspaceRoot.getPathString())));
} catch (URISyntaxException e) {
throw new ModuleFileFunctionException(e);
}
Expand Down

0 comments on commit 3ee4868

Please sign in to comment.