Skip to content

Commit

Permalink
Merge pull request kaytu-io#286 from kaytu-io/fix-trigger-agent
Browse files Browse the repository at this point in the history
fix: fix kaytu plugin root commands name
  • Loading branch information
artaasadi authored Jul 17, 2024
2 parents f7b4e87 + 1f794d5 commit 2cfce0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,12 @@ func ExecuteContext(ctx context.Context) {
preferencesCmd.AddCommand(thePreferencesCmd)
}
if plg.Config.RootCommands != nil {
pluginName := plg.Config.Name
if strings.HasPrefix(plg.Config.Name, "kaytu-io/") {
pluginName, _ = strings.CutPrefix(strings.Split(plg.Config.Name, "/")[1], "plugin-")
}
pluginRootCommands := &cobra.Command{
Use: plg.Config.Name,
Use: pluginName,
Short: "Plugin root commands",
Long: "Plugin root commands",
RunE: func(c *cobra.Command, args []string) error {
Expand Down

0 comments on commit 2cfce0c

Please sign in to comment.