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:
@ -175,10 +175,8 @@ func (r *RootCmd) ssh() *clibase.Cmd {
|
||||
|
||||
// OpenSSH passes stderr directly to the calling TTY.
|
||||
// This is required in "stdio" mode so a connecting indicator can be displayed.
|
||||
err = cliui.Agent(ctx, inv.Stderr, cliui.AgentOptions{
|
||||
Fetch: func(ctx context.Context) (codersdk.WorkspaceAgent, error) {
|
||||
return client.WorkspaceAgent(ctx, workspaceAgent.ID)
|
||||
},
|
||||
err = cliui.Agent(ctx, inv.Stderr, workspaceAgent.ID, cliui.AgentOptions{
|
||||
Fetch: client.WorkspaceAgent,
|
||||
FetchLogs: client.WorkspaceAgentStartupLogsAfter,
|
||||
Wait: wait,
|
||||
})
|
||||
|
Reference in New Issue
Block a user