mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-05 12:45:10 +01:00
Merge pull request #8906 from hashicorp/fix_8904
return error when LoadSnapshots turns up empty
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user