mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -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
|
// Get the context
|
||||||
ctx, _, ctxDiags := local.Context(opReq)
|
ctx, _, ctxDiags := local.Context(opReq)
|
||||||
|
|
||||||
|
// Creating the context can result in a lock, so ensure we release it
|
||||||
defer func() {
|
defer func() {
|
||||||
err := opReq.StateLocker.Unlock(nil)
|
err := opReq.StateLocker.Unlock(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -204,6 +204,7 @@ func (c *ImportCommand) Run(args []string) int {
|
|||||||
// Get the context
|
// Get the context
|
||||||
ctx, state, ctxDiags := local.Context(opReq)
|
ctx, state, ctxDiags := local.Context(opReq)
|
||||||
|
|
||||||
|
// Creating the context can result in a lock, so ensure we release it
|
||||||
defer func() {
|
defer func() {
|
||||||
err := opReq.StateLocker.Unlock(nil)
|
err := opReq.StateLocker.Unlock(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user