mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +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"
|
stage := "Running workspace agent startup scripts"
|
||||||
follow := opts.Wait
|
follow := opts.Wait && agent.LifecycleState.Starting()
|
||||||
if !follow {
|
if !follow {
|
||||||
stage += " (non-blocking)"
|
stage += " (non-blocking)"
|
||||||
}
|
}
|
||||||
|
@ -258,10 +258,9 @@ func TestAgent(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
want: []string{
|
want: []string{
|
||||||
"⧗ Running workspace agent startup scripts",
|
"⧗ Running workspace agent startup scripts (non-blocking)",
|
||||||
"ℹ︎ To connect immediately, reconnect with --wait=no or CODER_SSH_WAIT=no, see --help for more information.",
|
|
||||||
"Hello world",
|
"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.",
|
"Warning: A startup script exited with an error and your workspace may be incomplete.",
|
||||||
"For more information and troubleshooting, see",
|
"For more information and troubleshooting, see",
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user