Skip to content

Commit

Permalink
Add extractVMDriverVersion documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
josedonizetti committed Jul 4, 2019
1 parent 4cb8c4a commit d6ab605
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,11 @@ func validateDriverVersion(vmDriver string) {
}
}

// extractVMDriverVersion extracts the driver version.
// KVM and Hyperkit drivers support the `version` command, that display the information as:
// version: vX.X.X
// commit: XXXX
// This method returns the version 'vX.X.X' or empty if the version isn't found.
func extractVMDriverVersion(s string) string {
versionRegex := regexp.MustCompile(`version:(.*)`)
matches := versionRegex.FindStringSubmatch(s)
Expand Down

0 comments on commit d6ab605

Please sign in to comment.