unused err value and nil context
Incorrect err assignment had no effect. Never use a nil context.
This commit is contained in:
parent
d2c2d58f09
commit
96436f526a
|
@ -495,10 +495,10 @@ func (b *Remote) confirm(stopCtx context.Context, op *backend.Operation, opts *t
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == errRunDiscarded {
|
if err == errRunDiscarded {
|
||||||
|
err = errApplyDiscarded
|
||||||
if op.Destroy {
|
if op.Destroy {
|
||||||
err = errDestroyDiscarded
|
err = errDestroyDiscarded
|
||||||
}
|
}
|
||||||
err = errApplyDiscarded
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result <- err
|
result <- err
|
||||||
|
|
|
@ -195,7 +195,7 @@ func TestRemoteContextWithVars(t *testing.T) {
|
||||||
key := "key"
|
key := "key"
|
||||||
v.Key = &key
|
v.Key = &key
|
||||||
}
|
}
|
||||||
b.client.Variables.Create(nil, workspaceID, *v)
|
b.client.Variables.Create(context.TODO(), workspaceID, *v)
|
||||||
|
|
||||||
_, _, diags := b.Context(op)
|
_, _, diags := b.Context(op)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue