File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
arduino/cores/packagemanager Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,21 @@ func (pm *PackageManager) InstalledBoards() []*cores.Board {
439
439
return boards
440
440
}
441
441
442
+ // GetTool search for tool in all packages and platforms.
443
+ func (pm * PackageManager ) GetTool (toolId string ) * cores.Tool {
444
+ split := strings .Split (toolId , ":" )
445
+ if len (split ) != 2 {
446
+ return nil
447
+ }
448
+ if pack , ok := pm .Packages [split [0 ]]; ! ok {
449
+ return nil
450
+ } else if tool , ok := pack .Tools [split [1 ]]; ! ok {
451
+ return nil
452
+ } else {
453
+ return tool
454
+ }
455
+ }
456
+
442
457
func (pm * PackageManager ) FindToolsRequiredFromPlatformRelease (platform * cores.PlatformRelease ) ([]* cores.ToolRelease , error ) {
443
458
pm .Log .Infof ("Searching tools required for platform %s" , platform )
444
459
You can’t perform that action at this time.
0 commit comments