From 0849b48b9cb37057d253419a65900de951545a8a Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 21 Aug 2020 14:29:19 -0700 Subject: [PATCH] improve post validation --- pkg/minikube/machine/start.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/machine/start.go b/pkg/minikube/machine/start.go index f36eca251d..7edb44dfb3 100644 --- a/pkg/minikube/machine/start.go +++ b/pkg/minikube/machine/start.go @@ -217,8 +217,9 @@ func postStartValidations(h *host.Host, drvName string) { if err != nil { glog.Warningf("error running df -h /var: %v", err) } - output = strings.Trim(output, "\n") - percentageFull, err := strconv.Atoi(output[:len(output)-1]) + output = strings.TrimSpace(output) + output = strings.Trim(output, "%") + percentageFull, err := strconv.Atoi(output) if err != nil { glog.Warningf("error getting percentage of /var that is free: %v", err) }