Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Alex Jones
2023-03-24 12:33:59 +00:00
parent 1a486d4532
commit c8385531e6
5 changed files with 19 additions and 50 deletions

View File

@@ -24,8 +24,8 @@ var AuthCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
backendType := viper.GetString("backend_type")
if backendType == "" {
color.Red("No backend set. Please run k8sgpt init")
if backendType == "" && backend == "" {
color.Red("No backend set. Please run k8sgpt auth")
os.Exit(1)
}
// override the default backend if a flag is provided