From 36906fcee3adc8aab7b9d622d4eab97a7c6ef6c9 Mon Sep 17 00:00:00 2001 From: Sven Rebhan <36194019+srebhan@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:06:14 +0200 Subject: [PATCH] fix(tools.custom_builder): Ignore non-plugin sections during configuration (#13604) --- tools/custom_builder/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/custom_builder/config.go b/tools/custom_builder/config.go index fd9e96443..3b1f79c9a 100644 --- a/tools/custom_builder/config.go +++ b/tools/custom_builder/config.go @@ -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