builder/amazonebs: If only one error on destroy, just return it
This commit is contained in:
parent
13a27deea1
commit
0ac538dc31
@ -53,8 +53,12 @@ func (a *artifact) Destroy() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
|
if len(errors) == 1 {
|
||||||
|
return errors[0]
|
||||||
|
} else {
|
||||||
return &packer.MultiError{errors}
|
return &packer.MultiError{errors}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user