From 903fe744b199915f58ca69fd458943a1ffea58e5 Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Fri, 10 Apr 2020 00:15:20 +0900 Subject: [PATCH] Add output deleteingHost using KIC driver --- cmd/minikube/cmd/delete.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 5f4ad12513ff..22c16062d3d6 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -208,7 +208,13 @@ func deleteProfileContainersAndVolumes(name string) { func deleteProfile(profile *config.Profile) error { viper.Set(config.ProfileName, profile.Name) - deleteProfileContainersAndVolumes(profile.Name) + if profile.Config != nil { + // if driver is oci driver, delete containers and volumes + if driver.IsKIC(profile.Config.Driver) { + out.T(out.DeletingHost, `Deleting "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": profile.Name, "driver_name": profile.Config.Driver}) + deleteProfileContainersAndVolumes(profile.Name) + } + } api, err := machine.NewAPIClient() if err != nil {