diff --git a/cmd/minikube/cmd/version.go b/cmd/minikube/cmd/version.go index fdb1d40973bc..c073f53e3a22 100644 --- a/cmd/minikube/cmd/version.go +++ b/cmd/minikube/cmd/version.go @@ -69,7 +69,10 @@ var versionCmd = &cobra.Command{ klog.Warningf("error getting %s's version: %v", k, err) data[k] = "error" } else { - data[k] = strings.TrimSpace(rr.Stdout.String()) + version := rr.Stdout.String() + // remove extra lines after the version + version = strings.Split(version, "\n")[0] + data[k] = strings.TrimSpace(version) } }