return error when LoadSnapshots turns up empty

This commit is contained in:
Megan Marsh 2020-03-18 14:03:22 -07:00
parent b94937c05c
commit be1a6c9f35
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ func (d *VBox42Driver) LoadSnapshots(vmName string) (*VBoxSnapshot, error) {
var rootNode *VBoxSnapshot
stdoutString, err := d.VBoxManageWithOutput("snapshot", vmName, "list", "--machinereadable")
if stdoutString == "This machine does not have any snapshots" {
return rootNode, nil
return rootNode, fmt.Errorf("VM %s does not have any snapshots.", vmName)
}
if nil != err {
return nil, err