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:
@ -214,10 +214,10 @@ func main() {
|
||||
agent.LastConnectedAt = &lastConnectedAt
|
||||
},
|
||||
}
|
||||
err := cliui.Agent(inv.Context(), inv.Stdout, cliui.AgentOptions{
|
||||
err := cliui.Agent(inv.Context(), inv.Stdout, uuid.Nil, cliui.AgentOptions{
|
||||
FetchInterval: 100 * time.Millisecond,
|
||||
Wait: true,
|
||||
Fetch: func(_ context.Context) (codersdk.WorkspaceAgent, error) {
|
||||
Fetch: func(_ context.Context, _ uuid.UUID) (codersdk.WorkspaceAgent, error) {
|
||||
if len(fetchSteps) == 0 {
|
||||
return agent, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user