From be1a6c9f3575ec77f2aedb15abe8a93485053298 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 18 Mar 2020 14:03:22 -0700 Subject: [PATCH] return error when LoadSnapshots turns up empty --- builder/virtualbox/common/driver_4_2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/virtualbox/common/driver_4_2.go b/builder/virtualbox/common/driver_4_2.go index b710720dc..a10d45871 100644 --- a/builder/virtualbox/common/driver_4_2.go +++ b/builder/virtualbox/common/driver_4_2.go @@ -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