From 57001ee3a03ce0f2c6e49e7bb9a4dce706218a95 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Mon, 24 Jan 2022 10:48:43 -0300 Subject: [PATCH] Hide global `--tenant` flag on login command [DXCDT-14] (#388) * Hide globla `--tenant` flag on login command * Ignore return value from `MarkHidden` --- internal/cli/login.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/cli/login.go b/internal/cli/login.go index ebef7c6e7..38a888471 100644 --- a/internal/cli/login.go +++ b/internal/cli/login.go @@ -28,6 +28,11 @@ func loginCmd(cli *cli) *cobra.Command { }, } + cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { + _ = cmd.Flags().MarkHidden("tenant") + cmd.Parent().HelpFunc()(cmd, args) + }) + return cmd }