From 4e2f02ee0a14517f179369a4f09c4205ebda7250 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 15 Jun 2023 09:50:11 +1200 Subject: [PATCH] Fix: Only display sendmail help when sendmail subcommand is invoked This was overriding all Mailpit's help commands --- cmd/sendmail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sendmail.go b/cmd/sendmail.go index b44c5cf..6d9305a 100644 --- a/cmd/sendmail.go +++ b/cmd/sendmail.go @@ -21,7 +21,7 @@ func init() { rootCmd.AddCommand(sendmailCmd) // print out manual help screen - rootCmd.SetHelpTemplate(sendmail.HelpTemplate([]string{os.Args[0], "sendmail"})) + sendmailCmd.SetHelpTemplate(sendmail.HelpTemplate([]string{os.Args[0], "sendmail"})) // these are simply repeated for cli consistency as cobra/viper does not allow // multi-letter single-dash variables (-bs)