mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Make backend.Workspaces accept a context (#784)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
This commit is contained in:
@@ -83,7 +83,9 @@ func (c *WorkspaceSelectCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
states, err := b.Workspaces()
|
||||
ctx := context.TODO()
|
||||
|
||||
states, err := b.Workspaces(ctx)
|
||||
if err != nil {
|
||||
c.Ui.Error(err.Error())
|
||||
return 1
|
||||
@@ -103,7 +105,6 @@ func (c *WorkspaceSelectCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
var newState bool
|
||||
ctx := context.Background()
|
||||
|
||||
if !found {
|
||||
if orCreate {
|
||||
|
||||
Reference in New Issue
Block a user