From 4de14d7ef7bd60adb4944fe221870d8802139d35 Mon Sep 17 00:00:00 2001 From: r-vasquez Date: Thu, 7 Nov 2024 15:35:09 -0800 Subject: [PATCH] rpk connect: show rpk help text with --help/-h Previously we were displaying only the `connect` plugin help text, and not the rpk one. We were missing the lifecycle commands (install, uninstall, upgrade). --- src/go/rpk/pkg/cli/connect/connect.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/go/rpk/pkg/cli/connect/connect.go b/src/go/rpk/pkg/cli/connect/connect.go index 25170d05292a..1fdb7bcc6b4c 100644 --- a/src/go/rpk/pkg/cli/connect/connect.go +++ b/src/go/rpk/pkg/cli/connect/connect.go @@ -79,6 +79,10 @@ func NewCommand(fs afero.Fs, p *config.Params, execFn func(string, []string) err zap.L().Sugar().Warn("rpk is using a self-managed version of Redpanda Connect. If you want rpk to manage connect, use rpk connect uninstall && rpk connect install. To continue managing Connect manually, use our redpanda-connect package.") } } + if cmd.Flags().Changed("help") { + cmd.Help() + return + } zap.L().Debug("executing connect plugin", zap.String("path", pluginPath), zap.Strings("args", pluginArgs)) err = execFn(pluginPath, pluginArgs) out.MaybeDie(err, "unable to execute redpanda connect plugin: %v", err)