Merge pull request #6712 from medyagh/err_check

add missing err check
pull/6722/head
Medya Ghazizadeh 2020-02-20 13:57:40 -08:00 committed by GitHub
commit 8d17827115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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("'error loading 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