Skip to content

Commit

Permalink
Update pkg/minikube/cruntime/cri.go
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Powell <[email protected]>
  • Loading branch information
ComradeProgrammer and spowelljr authored Mar 20, 2024
1 parent 8f572a9 commit aa9cc4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/minikube/cruntime/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit aa9cc4f

Please sign in to comment.