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:
parent
7e9f19c43b
commit
d0d9dfcfa8
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user