From 201b36ab1530381111c5abf47540b0ae4c4efe89 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 21 Apr 2021 14:19:01 -0500 Subject: [PATCH] Run correct command plugin for subcommands --- internal/core/basis.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/core/basis.go b/internal/core/basis.go index 556c096a9..7d9dda378 100644 --- a/internal/core/basis.go +++ b/internal/core/basis.go @@ -375,6 +375,11 @@ func (b *Basis) Components(ctx context.Context) ([]*Component, error) { } func (b *Basis) component(ctx context.Context, typ component.Type, name string) (*Component, error) { + // If this is a command type component, the plugin is registered + // as only the root command + if typ == component.CommandType { + name = strings.Split(name, " ")[0] + } return componentCreatorMap[typ].Create(ctx, b, name) }