Skip to content

Commit

Permalink
Merge pull request #43515 from aloubyansky/comp-wo-path
Browse files Browse the repository at this point in the history
Check whether a dependency has resolved paths before setting a component path
  • Loading branch information
aloubyansky authored Sep 26, 2024
2 parents aa859dc + 84baf7c commit 68f151e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ private Builder() {
public Builder setApplicationModel(ApplicationModel model) {
setMainComponent(ApplicationComponent.builder().setResolvedDependency(model.getAppArtifact()).build());
for (var d : model.getDependencies()) {
addComponent(ApplicationComponent.builder()
.setResolvedDependency(d)
.setPath(d.getResolvedPaths().iterator().next())
.build());
final ApplicationComponent.Builder comp = ApplicationComponent.builder().setResolvedDependency(d);
if (!d.getResolvedPaths().isEmpty()) {
comp.setPath(d.getResolvedPaths().iterator().next());
}
addComponent(comp.build());
}
return this;
}
Expand Down

0 comments on commit 68f151e

Please sign in to comment.