mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
Merge pull request #24122 from hashicorp/alisdair/unlock-commentary
command: Comment to explain why unlock is required
This commit is contained in:
commit
678760b61a
@ -97,6 +97,7 @@ func (c *ConsoleCommand) Run(args []string) int {
|
||||
// Get the context
|
||||
ctx, _, ctxDiags := local.Context(opReq)
|
||||
|
||||
// Creating the context can result in a lock, so ensure we release it
|
||||
defer func() {
|
||||
err := opReq.StateLocker.Unlock(nil)
|
||||
if err != nil {
|
||||
|
@ -204,6 +204,7 @@ func (c *ImportCommand) Run(args []string) int {
|
||||
// Get the context
|
||||
ctx, state, ctxDiags := local.Context(opReq)
|
||||
|
||||
// Creating the context can result in a lock, so ensure we release it
|
||||
defer func() {
|
||||
err := opReq.StateLocker.Unlock(nil)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user