diff --git a/driver.go b/driver.go index d189bb9..09d61e1 100644 --- a/driver.go +++ b/driver.go @@ -2,7 +2,7 @@ package drivervbox const ( driverName = "vbox" - driverDescription = "Kutti driver for VirtualBox >=6.0" + driverDescription = "Kutti driver for VirtualBox 6.0 and above" networkNameSuffix = "kuttinet" networkNamePattern = "*" + networkNameSuffix dhcpaddress = "192.168.125.3" @@ -27,7 +27,7 @@ func (vd *Driver) Name() string { return driverName } -// Description returns "Kutti driver for VirtualBox >=6.0" +// Description returns "Kutti driver for VirtualBox 6.0 and above" func (vd *Driver) Description() string { return driverDescription } @@ -43,7 +43,11 @@ func (vd *Driver) Status() string { } func (vd *Driver) Error() string { - panic("not implemented") // TODO: Implement + if vd.status != "Error" { + return "" + } + + return vd.errormessage } func trimQuotes(s string) string { diff --git a/drivervbox-findvboxmanage.go b/drivervbox-findvboxmanage.go index 505d3a2..54a5954 100644 --- a/drivervbox-findvboxmanage.go +++ b/drivervbox-findvboxmanage.go @@ -2,7 +2,10 @@ package drivervbox -import "os/exec" +import ( + "errors" + "os/exec" +) func findvboxmanage() (string, error) { @@ -13,5 +16,7 @@ func findvboxmanage() (string, error) { } // Give up - return "", err + return "", errors.New( + "VBoxManage not found. Please ensure that Oracle VirtualBox 6.0 or greater is installed, and the VBoxManage utility is on your PATH", + ) } diff --git a/drivervbox-findvboxmanage_windows.go b/drivervbox-findvboxmanage_windows.go index 4241124..1948abc 100644 --- a/drivervbox-findvboxmanage_windows.go +++ b/drivervbox-findvboxmanage_windows.go @@ -31,5 +31,7 @@ func findvboxmanage() (string, error) { } // Give up - return "", err + return "", errors.New( + "VBoxManage.exe not found. Please ensure that Oracle VirtualBox 6.0 or greater is installed, and VBoxManage.exe utility is on your PATH", + ) }