From c54c931443198c07418b983dbbc78406a1b3d428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C4=87?= Date: Fri, 25 Jul 2025 10:50:02 +0200 Subject: [PATCH] Fix issue with plugin extension command not being shown in help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Kuć --- app/cli/cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cli/cmd/root.go b/app/cli/cmd/root.go index 558f8477c..dc10db60f 100644 --- a/app/cli/cmd/root.go +++ b/app/cli/cmd/root.go @@ -245,8 +245,8 @@ func NewRootCmd(l zerolog.Logger) *cobra.Command { newReferrerDiscoverCmd(), newPolicyCmd(), ) - // Load plugins if we are not running a subcommand - if len(os.Args) > 1 && os.Args[1] != "completion" && os.Args[1] != "help" { + // Load plugins for root command and subcommands (except completion and help) + if len(os.Args) == 1 || (len(os.Args) > 1 && os.Args[1] != "completion" && os.Args[1] != "help") { pluginManager = plugins.NewManager(&logger) if err := loadAllPlugins(rootCmd); err != nil { logger.Error().Err(err).Msg("Failed to load plugins, continuing with built-in commands only")