We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fa5afa commit b439c3eCopy full SHA for b439c3e
cli/ssh.go
@@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd {
82
if xerrors.Is(err, context.Canceled) {
83
return cliui.Canceled
84
}
85
- if xerrors.Is(err, cliui.AgentStartError) {
86
- return xerrors.New("Agent startup script exited with non-zero status, use --no-wait to login anyway.")
+ if !xerrors.Is(err, cliui.AgentStartError) {
+ return xerrors.Errorf("await agent: %w", err)
87
88
- return xerrors.Errorf("await agent: %w", err)
+
89
+ // We don't want to fail on a startup script error because it's
90
+ // natural that the user will want to fix the script and try again.
91
+ // We don't print the error because cliui.Agent does that for us.
92
93
94
conn, err := client.DialWorkspaceAgent(ctx, workspaceAgent.ID, &codersdk.DialWorkspaceAgentOptions{})
0 commit comments