Unwrap error before comparing
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
f52accc47f
commit
1f419d0abc
1 changed files with 1 additions and 1 deletions
|
|
@ -328,7 +328,7 @@ func (l *LXD) DeleteInstance(ctx context.Context, instance string) error {
|
|||
// I am not proud of this, but the drivers.ErrInstanceIsStopped from LXD pulls in
|
||||
// a ton of CGO, linux specific dependencies, that don't make sense having
|
||||
// in garm.
|
||||
if !(err.Error() == errInstanceIsStopped.Error()) {
|
||||
if !(errors.Cause(err).Error() == errInstanceIsStopped.Error()) {
|
||||
return errors.Wrap(err, "stopping instance")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue