mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-05-12 10:04:22 +00:00
fix: auth update throw out exception (#1193)
Signed-off-by: Guangya Liu <gyliu@ibm.com> Co-authored-by: Matthis <matthish29@gmail.com>
This commit is contained in:
parent
3c08118104
commit
391a3cd5ad
@ -28,6 +28,7 @@ var updateCmd = &cobra.Command{
|
||||
Long: "The command to update an AI backend provider",
|
||||
// Args: cobra.ExactArgs(1),
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
_ = cmd.MarkFlagRequired("backend")
|
||||
backend, _ := cmd.Flags().GetString("backend")
|
||||
if strings.ToLower(backend) == "azureopenai" {
|
||||
_ = cmd.MarkFlagRequired("engine")
|
||||
|
Loading…
Reference in New Issue
Block a user