mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix(cli): follow logs only when agent is starting (#13864)
This commit is contained in:
committed by
GitHub
parent
70046ea08d
commit
c8484b4fc8
@ -132,7 +132,7 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
|
||||
}
|
||||
|
||||
stage := "Running workspace agent startup scripts"
|
||||
follow := opts.Wait
|
||||
follow := opts.Wait && agent.LifecycleState.Starting()
|
||||
if !follow {
|
||||
stage += " (non-blocking)"
|
||||
}
|
||||
|
@ -258,10 +258,9 @@ func TestAgent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
want: []string{
|
||||
"⧗ Running workspace agent startup scripts",
|
||||
"ℹ︎ To connect immediately, reconnect with --wait=no or CODER_SSH_WAIT=no, see --help for more information.",
|
||||
"⧗ Running workspace agent startup scripts (non-blocking)",
|
||||
"Hello world",
|
||||
"✘ Running workspace agent startup scripts",
|
||||
"✘ Running workspace agent startup scripts (non-blocking)",
|
||||
"Warning: A startup script exited with an error and your workspace may be incomplete.",
|
||||
"For more information and troubleshooting, see",
|
||||
},
|
||||
|
Reference in New Issue
Block a user