提交 467d8c97 编写于 作者: F Francis 提交者: Medya Ghazizadeh

Clean up profile folder after minikube delete

上级 62c0d53b
......@@ -83,7 +83,7 @@ associated files.`,
console.Fatal("Failed to kill mount process: %v", err)
}
if err := os.Remove(constants.GetProfileFile(viper.GetString(pkg_config.MachineProfile))); err != nil {
if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil {
if os.IsNotExist(err) {
console.OutStyle(console.Meh, "%q profile does not exist", profile)
os.Exit(0)
......
......@@ -181,6 +181,11 @@ func GetProfileFile(profile string) string {
return filepath.Join(GetMinipath(), "profiles", profile, "config.json")
}
// GetProfilePath returns the Minikube profile path of config file
func GetProfilePath(profile string) string {
return filepath.Join(GetMinipath(), "profiles", profile)
}
// AddonsPath is the default path of the addons configuration
const AddonsPath = "/etc/kubernetes/addons"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册