From d8f0f01c658a52953804dad792171ae02e126551 Mon Sep 17 00:00:00 2001 From: Ruben Hoenle Date: Thu, 6 Nov 2025 09:25:28 +0100 Subject: [PATCH] fix(auth): hide misleading parameters in get access token cmd relates to #1001 / STACKITCLI-282 --- internal/cmd/auth/get-access-token/get_access_token.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/cmd/auth/get-access-token/get_access_token.go b/internal/cmd/auth/get-access-token/get_access_token.go index a26b71b20..5ff3da916 100644 --- a/internal/cmd/auth/get-access-token/get_access_token.go +++ b/internal/cmd/auth/get-access-token/get_access_token.go @@ -67,6 +67,13 @@ func NewCmd(params *params.CmdParams) *cobra.Command { } }, } + + // hide project id flag from help command because it could mislead users + cmd.SetHelpFunc(func(command *cobra.Command, strings []string) { + _ = command.Flags().MarkHidden(globalflags.ProjectIdFlag) // nolint:errcheck // there's no chance to handle the error here + command.Parent().HelpFunc()(command, strings) + }) + return cmd }