mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
fix(cli): ensure cliui.Agent
doesn't fetch infinitely (#8446)
This commit is contained in:
@ -40,11 +40,9 @@ func (r *RootCmd) speedtest() *clibase.Cmd {
|
||||
return err
|
||||
}
|
||||
|
||||
err = cliui.Agent(ctx, inv.Stderr, cliui.AgentOptions{
|
||||
Fetch: func(ctx context.Context) (codersdk.WorkspaceAgent, error) {
|
||||
return client.WorkspaceAgent(ctx, workspaceAgent.ID)
|
||||
},
|
||||
Wait: false,
|
||||
err = cliui.Agent(ctx, inv.Stderr, workspaceAgent.ID, cliui.AgentOptions{
|
||||
Fetch: client.WorkspaceAgent,
|
||||
Wait: false,
|
||||
})
|
||||
if err != nil {
|
||||
return xerrors.Errorf("await agent: %w", err)
|
||||
|
Reference in New Issue
Block a user