From 412340ea63fa13222504081ef9f9e1636fc67a29 Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Wed, 7 Aug 2024 16:47:09 +0800 Subject: [PATCH] fix: segmentation violation during serve (#1215) Signed-off-by: Kay Yan Signed-off-by: Ronald Petty --- cmd/serve/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index 1984ac9805..be20f8564a 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -149,7 +149,7 @@ var ServeCmd = &cobra.Command{ } } - if aiProvider.Name == "" { + if aiProvider == nil || aiProvider.Name == "" { color.Red("Error: AI provider %s not specified in configuration. Please run k8sgpt auth", backend) os.Exit(1) }