File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd {
82
82
if xerrors .Is (err , context .Canceled ) {
83
83
return cliui .Canceled
84
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." )
85
+ if ! xerrors .Is (err , cliui .AgentStartError ) {
86
+ return xerrors .Errorf ( "await agent: %w" , err )
87
87
}
88
- return xerrors .Errorf ("await agent: %w" , err )
88
+
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.
89
92
}
90
93
91
94
conn , err := client .DialWorkspaceAgent (ctx , workspaceAgent .ID , & codersdk.DialWorkspaceAgentOptions {})
You can’t perform that action at this time.
0 commit comments