diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 2eefcce6a986541d21971d594633b2333b82146e..ee2d419347f601d4c1ee91b46399b3a6ff2e6c20 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -97,7 +97,9 @@ func runDelete(cmd *cobra.Command, args []string) { profileFlag := viper.GetString(config.MachineProfile) validProfiles, invalidProfiles, err := pkg_config.ListProfiles() - glog.Warningf("Couldn't find any profiles in minikube home %q: %v", localpath.MiniPath(), err) + if err != nil { + glog.Warningf("Couldn't find any profiles in minikube home %q: %v", localpath.MiniPath(), err) + } profilesToDelete := append(validProfiles, invalidProfiles...) // in the case user has more than 1 profile and runs --purge // to prevent abandoned VMs/containers, force user to run with delete --all