From aa9cc4f55c2dce2d5548e389e0dacfc6a1de1a0c Mon Sep 17 00:00:00 2001 From: Raiden Shogun <46831212+ComradeProgrammer@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:31:27 +0100 Subject: [PATCH] Update pkg/minikube/cruntime/cri.go Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com> --- pkg/minikube/cruntime/cri.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/cruntime/cri.go b/pkg/minikube/cruntime/cri.go index ede023301bb3..a6d069ff40a8 100644 --- a/pkg/minikube/cruntime/cri.go +++ b/pkg/minikube/cruntime/cri.go @@ -58,11 +58,11 @@ func CrictlVersion(c CommandRunner) (*semver.Version, error) { } stdout := rr.Stdout.String() reg := regexp.MustCompile(`crictl\s*version\s*(v\d*\.\d*.\d*)`) - subMatches := reg.FindSubmatch([]byte(stdout)) + subMatches := reg.FindStringSubmatch(stdout) if len(subMatches) < 2 { return nil, fmt.Errorf("failed to find the crictl version") } - version, err := util.ParseKubernetesVersion(string(subMatches[1])) + version, err := util.ParseKubernetesVersion(subMatches[1]) if err != nil { return nil, err }