Parcourir la source

fix kubeconfig path to absolut

Mohammed Nafees il y a 4 ans
Parent
commit
0b504dc375
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      cli/cmd/config/config.go

+ 2 - 2
cli/cmd/config/config.go

@@ -303,8 +303,8 @@ func (c *CLIConfig) SetKubeconfig(kubeconfig string) error {
 		return fmt.Errorf("%s does not exist", path)
 		return fmt.Errorf("%s does not exist", path)
 	}
 	}
 
 
-	viper.Set("kubeconfig", kubeconfig)
-	color.New(color.FgGreen).Printf("Set the path to kubeconfig as %s\n", kubeconfig)
+	viper.Set("kubeconfig", path)
+	color.New(color.FgGreen).Printf("Set the path to kubeconfig as %s\n", path)
 	err = viper.WriteConfig()
 	err = viper.WriteConfig()
 
 
 	if err != nil {
 	if err != nil {