mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Make backend.StateMgr accept a context (#780)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -97,8 +98,10 @@ func (c *StatePushCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
ctx := context.TODO()
|
||||
|
||||
// Get the state manager for the currently-selected workspace
|
||||
stateMgr, err := b.StateMgr(workspace)
|
||||
stateMgr, err := b.StateMgr(ctx, workspace)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Failed to load destination state: %s", err))
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user