Skip to content

Commit 87eb1c7

Browse files
authored
Fix issue with plugin extension command not being shown in help (#2287)
Signed-off-by: Rafał Kuć <r.kuc@solr.pl>
1 parent a96722f commit 87eb1c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/cli/cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ func NewRootCmd(l zerolog.Logger) *cobra.Command {
245245
newReferrerDiscoverCmd(), newPolicyCmd(),
246246
)
247247

248-
// Load plugins if we are not running a subcommand
249-
if len(os.Args) > 1 && os.Args[1] != "completion" && os.Args[1] != "help" {
248+
// Load plugins for root command and subcommands (except completion and help)
249+
if len(os.Args) == 1 || (len(os.Args) > 1 && os.Args[1] != "completion" && os.Args[1] != "help") {
250250
pluginManager = plugins.NewManager(&logger)
251251
if err := loadAllPlugins(rootCmd); err != nil {
252252
logger.Error().Err(err).Msg("Failed to load plugins, continuing with built-in commands only")

0 commit comments

Comments
 (0)