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

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

parent 13a27dee
......@@ -53,7 +53,11 @@ func (a *artifact) Destroy() error {
}
if len(errors) > 0 {
return &packer.MultiError{errors}
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