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

pull/24/head
Mitchell Hashimoto 13 years ago
parent 4f229dea09
commit 0edeb49467

@ -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

Loading…
Cancel
Save