Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb439c3e

Browse files
authored
fix: permit SSH by default when startup script fails (#6798)
1 parent7fa5afa commitb439c3e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎cli/ssh.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,13 @@ func (r *RootCmd) ssh() *clibase.Cmd {
8282
ifxerrors.Is(err,context.Canceled) {
8383
returncliui.Canceled
8484
}
85-
ifxerrors.Is(err,cliui.AgentStartError) {
86-
returnxerrors.New("Agent startup script exited with non-zero status, use --no-wait to login anyway.")
85+
if!xerrors.Is(err,cliui.AgentStartError) {
86+
returnxerrors.Errorf("await agent: %w",err)
8787
}
88-
returnxerrors.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.
8992
}
9093

9194
conn,err:=client.DialWorkspaceAgent(ctx,workspaceAgent.ID,&codersdk.DialWorkspaceAgentOptions{})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp