From 6e75e4102311dbe1f9185756065c814df22ab105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 12 Dec 2025 14:44:49 +0100 Subject: [PATCH] fix search index flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- services/search/pkg/command/index.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/search/pkg/command/index.go b/services/search/pkg/command/index.go index 1a9f979d8..383b178f1 100644 --- a/services/search/pkg/command/index.go +++ b/services/search/pkg/command/index.go @@ -27,7 +27,8 @@ func Index(cfg *config.Config) *cobra.Command { return configlog.ReturnFatal(parser.ParseConfig(cfg)) }, RunE: func(cmd *cobra.Command, args []string) error { - if cmd.Flag("space").Value.String() == "" && !cmd.Flag("all-spaces").Changed { + allSpaces, _ := cmd.Flags().GetBool("all-spaces") + if cmd.Flag("space").Value.String() == "" && !allSpaces { return errors.New("either --space or --all-spaces is required") }