mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
fix(cli): ensure cliui.Agent
doesn't fetch infinitely (#8446)
This commit is contained in:
@ -90,11 +90,9 @@ func (r *RootCmd) portForward() *clibase.Cmd {
|
||||
}
|
||||
}
|
||||
|
||||
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