From 35c21ec1bfe189a07f0a764a0d37ca74ef95619f Mon Sep 17 00:00:00 2001 From: neha_gupta Date: Wed, 8 Mar 2023 16:52:42 +0530 Subject: [PATCH] avoid events for version command (#2719) Do not send event on call of - help or version commands --- #### Does this PR need a docs update or release note? - [ ] :no_entry: No #### Type of change - [ ] :broom: Tech Debt/Cleanup #### Test Plan - [ ] :muscle: Manual --- src/cli/cli.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.go b/src/cli/cli.go index 9ab485632..d7e5a0da6 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -61,13 +61,14 @@ func preRun(cc *cobra.Command, args []string) error { print.Info(ctx, "Logging to file: "+logger.LogFile) } - avoidTheseCommands = []string{ - "help for corso", + avoidTheseDescription := []string{ "Initialize a repository.", "Initialize a S3 repository", + "Help about any command", + "Free, Secure, Open-Source Backup for M365.", } - if !slices.Contains(avoidTheseCommands, cc.Short) { + if !slices.Contains(avoidTheseDescription, cc.Short) { cfg, err := config.GetConfigRepoDetails(ctx, true, nil) if err != nil { log.Error("Error while getting config info to run command: ", cc.Use)