Commit 0ac538dc authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/amazonebs: If only one error on destroy, just return it

parent 13a27dee
......@@ -53,8 +53,12 @@ func (a *artifact) Destroy() error {
}
if len(errors) > 0 {
if len(errors) == 1 {
return errors[0]
} else {
return &packer.MultiError{errors}
}
}
return nil
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment