avoid events for version command (#2719)
<!-- Insert PR description--> Do not send event on call of - help or version commands --- #### Does this PR need a docs update or release note? - [ ] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🧹 Tech Debt/Cleanup #### Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual
This commit is contained in:
parent
1b4646a4b4
commit
35c21ec1bf
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user