From 1f419d0abc462874cbb45941e2634870d1c02bf2 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Tue, 28 Jun 2022 16:27:03 +0000 Subject: [PATCH] Unwrap error before comparing Signed-off-by: Gabriel Adrian Samfira --- runner/providers/lxd/lxd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/providers/lxd/lxd.go b/runner/providers/lxd/lxd.go index a80933de..5fa426a3 100644 --- a/runner/providers/lxd/lxd.go +++ b/runner/providers/lxd/lxd.go @@ -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") } }