Skip to content

Commit 9f8ab6f

Browse files
authored
fix(auth): hide misleading parameters in get access token cmd (#1069)
relates to #1001 / STACKITCLI-282
1 parent 2f8acae commit 9f8ab6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/cmd/auth/get-access-token/get_access_token.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6767
}
6868
},
6969
}
70+
71+
// hide project id flag from help command because it could mislead users
72+
cmd.SetHelpFunc(func(command *cobra.Command, strings []string) {
73+
_ = command.Flags().MarkHidden(globalflags.ProjectIdFlag) // nolint:errcheck // there's no chance to handle the error here
74+
command.Parent().HelpFunc()(command, strings)
75+
})
76+
7077
return cmd
7178
}
7279

0 commit comments

Comments
 (0)