Commit 0552b65c authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #1333 from hnakamur/accept_virtualbox_release_candidate_version

builder/virtualbox: Accept VirtualBox release candidate version
parents 4101a25b 7549735b
...@@ -186,9 +186,9 @@ func (d *VBox42Driver) Version() (string, error) { ...@@ -186,9 +186,9 @@ func (d *VBox42Driver) Version() (string, error) {
return "", fmt.Errorf("VirtualBox is not properly setup: %s", versionOutput) return "", fmt.Errorf("VirtualBox is not properly setup: %s", versionOutput)
} }
versionRe := regexp.MustCompile("[^.0-9]") versionRe := regexp.MustCompile("^[.0-9]+(?:_RC[0-9]+)?")
matches := versionRe.Split(versionOutput, 2) matches := versionRe.FindAllString(versionOutput, 1)
if len(matches) == 0 || matches[0] == "" { if matches == nil {
return "", fmt.Errorf("No version found: %s", versionOutput) return "", fmt.Errorf("No version found: %s", versionOutput)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment