fix(tools.custom_builder): Ignore non-plugin sections during configuration (#13604)

This commit is contained in:
Sven Rebhan 2023-07-13 15:06:14 +02:00 committed by GitHub
parent b20c0d7fad
commit 36906fcee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -175,6 +175,19 @@ func (s *selection) extractPluginsFromConfig(buf []byte) error {
}
for category, subtbl := range table.Fields {
// Check if we should handle the category, i.e. it contains plugins
// to configure.
var valid bool
for _, c := range categories {
if c == category {
valid = true
break
}
}
if !valid {
continue
}
categoryTbl, ok := subtbl.(*ast.Table)
if !ok {
continue