Merge pull request #8906 from hashicorp/fix_8904

return error when LoadSnapshots turns up empty
This commit is contained in:
Megan Marsh 2020-03-18 14:45:54 -07:00 committed by GitHub
commit fa49d2145d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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