From a269de762f666ef7a0c87e3eeb5fbb0f42760a1b Mon Sep 17 00:00:00 2001 From: Jose Donizetti Date: Tue, 3 Mar 2020 20:41:24 -0300 Subject: [PATCH] Fix delete --all if using non default profile --- cmd/minikube/cmd/delete.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index f64579112f51..75b6088a0fb3 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -34,7 +34,6 @@ import ( cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" "k8s.io/minikube/pkg/drivers/kic/oci" "k8s.io/minikube/pkg/minikube/cluster" - "k8s.io/minikube/pkg/minikube/config" pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/cruntime" @@ -94,7 +93,6 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.UsageT("Usage: minikube delete") } - profileFlag := viper.GetString(config.MachineProfile) validProfiles, invalidProfiles, err := pkg_config.ListProfiles() if err != nil { @@ -112,9 +110,6 @@ func runDelete(cmd *cobra.Command, args []string) { } if deleteAll { - if profileFlag != constants.DefaultMachineName { - exit.UsageT("usage: minikube delete --all") - } delLabel := fmt.Sprintf("%s=%s", oci.CreatedByLabelKey, "true") errs := oci.DeleteContainersByLabel(oci.Docker, delLabel) if len(errs) > 0 { // it will error if there is no container to delete