builder/vmware: verify various paths exist for Workstation

This commit is contained in:
Mitchell Hashimoto 2013-07-31 12:39:49 -07:00
parent 422f25749e
commit d1e0e955ab
1 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
@ -104,6 +105,18 @@ func (d *Workstation9Driver) Verify() error {
}
}
if _, err := os.Stat(d.AppPath); err != nil {
return fmt.Errorf("VMware application not found: %s", d.AppPath)
}
if _, err := os.Stat(d.VmrunPath); err != nil {
return fmt.Errorf("'vmrun' application not found: %s", d.VmrunPath)
}
if _, err := os.Stat(d.VdiskManagerPath); err != nil {
return fmt.Errorf("'vmrun' application not found: %s", d.VdiskManagerPath)
}
// Check to see if it APPEARS to be licensed.
if err := workstationCheckLicense(); err != nil {
return err