builder/amazonebs: If only one error on destroy, just return it
This commit is contained in:
parent
13a27deea1
commit
0ac538dc31
|
@ -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…
Reference in New Issue