|
|
|
@ -135,9 +135,10 @@ func (d *VBox42Driver) Version() (string, error) {
|
|
|
|
|
|
|
|
|
|
|
|
versionOutput := strings.TrimSpace(stdout.String())
|
|
|
|
versionOutput := strings.TrimSpace(stdout.String())
|
|
|
|
log.Printf("VBoxManage --version output: %s", versionOutput)
|
|
|
|
log.Printf("VBoxManage --version output: %s", versionOutput)
|
|
|
|
|
|
|
|
|
|
|
|
versionRe := regexp.MustCompile("[^.0-9]")
|
|
|
|
versionRe := regexp.MustCompile("[^.0-9]")
|
|
|
|
matches := versionRe.Split(versionOutput, 2)
|
|
|
|
matches := versionRe.Split(versionOutput, 2)
|
|
|
|
if len(matches) == 0 {
|
|
|
|
if len(matches) == 0 || matches[0] == "" {
|
|
|
|
return "", fmt.Errorf("No version found: %s", versionOutput)
|
|
|
|
return "", fmt.Errorf("No version found: %s", versionOutput)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|