mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: permit SSH by default when startup script fails (#6798)
This commit is contained in:
+6
-3
@@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd {
|
||||
if xerrors.Is(err, context.Canceled) {
|
||||
return cliui.Canceled
|
||||
}
|
||||
if xerrors.Is(err, cliui.AgentStartError) {
|
||||
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)
|
||||
}
|
||||
return xerrors.Errorf("await agent: %w", err)
|
||||
|
||||
// We don't want to fail on a startup script error because it's
|
||||
// natural that the user will want to fix the script and try again.
|
||||
// We don't print the error because cliui.Agent does that for us.
|
||||
}
|
||||
|
||||
conn, err := client.DialWorkspaceAgent(ctx, workspaceAgent.ID, &codersdk.DialWorkspaceAgentOptions{})
|
||||
|
||||
Reference in New Issue
Block a user