1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

If package doesn't have that tool, it probably comes from another package, so we consult the resolvedTools instead

This commit is contained in:
Federico Fissore 2015-11-20 14:58:54 +01:00
parent 7e9f19c43b
commit d0d9dfcfa8
2 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,17 @@ public abstract class ContributedPackage {
return null;
}
public ContributedTool findResolvedTool(String toolName, String version) {
for (ContributedPlatform platform : getPlatforms()) {
for (ContributedTool tool : platform.getResolvedTools()) {
if (toolName.equals(tool.getName()) && version.equals(tool.getVersion())) {
return tool;
}
}
}
return null;
}
public boolean isTrusted() {
return trusted;
}

View File

@ -260,6 +260,9 @@ public class ContributionsIndexer {
private void syncToolWithFilesystem(ContributedPackage pack, File installationFolder, String toolName, String version) {
ContributedTool tool = pack.findTool(toolName, version);
if (tool == null) {
tool = pack.findResolvedTool(toolName, version);
}
if (tool == null) {
return;
}