1
0
mirror of https://github.com/k8sgpt-ai/k8sgpt.git synced 2025-05-12 10:04:22 +00:00

fix: auth update throw out exception ()

Signed-off-by: Guangya Liu <gyliu@ibm.com>
Co-authored-by: Matthis <matthish29@gmail.com>
This commit is contained in:
Guangya Liu 2024-07-18 11:49:51 -04:00 committed by GitHub
parent 3c08118104
commit 391a3cd5ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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")