We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent7fa5afa commitb439c3eCopy full SHA for b439c3e
cli/ssh.go
@@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd {
82
ifxerrors.Is(err,context.Canceled) {
83
returncliui.Canceled
84
}
85
-ifxerrors.Is(err,cliui.AgentStartError) {
86
-returnxerrors.New("Agent startup script exited with non-zero status, use --no-wait to login anyway.")
+if!xerrors.Is(err,cliui.AgentStartError) {
+returnxerrors.Errorf("await agent: %w",err)
87
88
-returnxerrors.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{})