Skip to content

Commit 999a51f

Browse files
committed
Do not treat custom menu items without label as 'malformed'
1 parent 7d1916d commit 999a51f

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

arduino/cores/packagemanager/loader.go

-22
Original file line numberDiff line numberDiff line change
@@ -481,25 +481,8 @@ func (pm *Builder) loadBoards(platform *cores.PlatformRelease) error {
481481
// set all other boards properties
482482
delete(propertiesByBoard, "menu")
483483

484-
skippedBoards := []string{}
485484
for boardID, boardProperties := range propertiesByBoard {
486485
var board *cores.Board
487-
for key := range boardProperties.AsMap() {
488-
if !strings.HasPrefix(key, "menu.") {
489-
continue
490-
}
491-
// Menu keys are formed like this:
492-
// menu.cache.off=false
493-
// menu.cache.on=true
494-
// so we assume that the a second element in the slice exists
495-
menuName := strings.Split(key, ".")[1]
496-
if !platform.Menus.ContainsKey(menuName) {
497-
fqbn := fmt.Sprintf("%s:%s:%s", platform.Platform.Package.Name, platform.Platform.Architecture, boardID)
498-
skippedBoards = append(skippedBoards, fqbn)
499-
goto next_board
500-
}
501-
}
502-
503486
if !platform.PluggableDiscoveryAware {
504487
convertVidPidIdentificationPropertiesToPluggableDiscovery(boardProperties)
505488
convertUploadToolsToPluggableDiscovery(boardProperties)
@@ -514,11 +497,6 @@ func (pm *Builder) loadBoards(platform *cores.PlatformRelease) error {
514497
boardProperties.Set("_id", boardID)
515498
board = platform.GetOrCreateBoard(boardID)
516499
board.Properties.Merge(boardProperties)
517-
next_board:
518-
}
519-
520-
if len(skippedBoards) > 0 {
521-
return fmt.Errorf(tr("skipping loading of boards %s: malformed custom board options"), strings.Join(skippedBoards, ", "))
522500
}
523501

524502
return nil

0 commit comments

Comments
 (0)