Skip to content

Commit c8484b4

Browse files
authored
fix(cli): follow logs only when agent is starting (#13864)
1 parent 70046ea commit c8484b4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cli/cliui/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
132132
}
133133

134134
stage := "Running workspace agent startup scripts"
135-
follow := opts.Wait
135+
follow := opts.Wait && agent.LifecycleState.Starting()
136136
if !follow {
137137
stage += " (non-blocking)"
138138
}

cli/cliui/agent_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,9 @@ func TestAgent(t *testing.T) {
258258
},
259259
},
260260
want: []string{
261-
"⧗ Running workspace agent startup scripts",
262-
"ℹ︎ To connect immediately, reconnect with --wait=no or CODER_SSH_WAIT=no, see --help for more information.",
261+
"⧗ Running workspace agent startup scripts (non-blocking)",
263262
"Hello world",
264-
"✘ Running workspace agent startup scripts",
263+
"✘ Running workspace agent startup scripts (non-blocking)",
265264
"Warning: A startup script exited with an error and your workspace may be incomplete.",
266265
"For more information and troubleshooting, see",
267266
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy