瀏覽代碼

Merge pull request #2109 from porter-dev/nafees/self-hosted-kubeconfig

[hotfix] Fix absolute path for local kubeconfig
abelanger5 4 年之前
父節點
當前提交
657ef42c8b
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 {