Make backend.Workspaces accept a context (#784)

Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
This commit is contained in:
Marcin Wyszynski
2023-10-24 19:59:28 +02:00
committed by GitHub
parent 55144fefed
commit da1ba56b41
34 changed files with 113 additions and 103 deletions

View File

@@ -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 {