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

Commit76d2bbc

Browse files
committed
Improve start option
1 parente692a18 commit76d2bbc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ func (a *agent) handleSSHSession(session ssh.Session) (retErr error) {
688688
cmd.Env=append(cmd.Env,fmt.Sprintf("TERM=%s",sshPty.Term))
689689

690690
// The pty package sets `SSH_TTY` on supported platforms.
691-
ptty,process,err:=pty.Start(cmd,pty.WithPTYOptions(
691+
ptty,process,err:=pty.Start(cmd,pty.WithPTYOption(
692692
pty.WithSSHRequest(sshPty),
693693
pty.WithLogger(slog.Stdlib(ctx,a.logger,slog.LevelInfo)),
694694
))

‎pty/start.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ type startOptions struct {
1111
ptyOpts []Option
1212
}
1313

14-
//WithPTYOptions applies the given options to the underlying PTY.
15-
funcWithPTYOptions(opts...Option)StartOption {
14+
//WithPTYOption applies the given options to the underlying PTY.
15+
funcWithPTYOption(opts...Option)StartOption {
1616
returnfunc(o*startOptions) {
17-
o.ptyOpts=opts
17+
o.ptyOpts=append(o.ptyOpts,opts...)
1818
}
1919
}
2020

‎pty/start_other_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestStart(t *testing.T) {
4343

4444
t.Run("SSH_TTY",func(t*testing.T) {
4545
t.Parallel()
46-
opts:=pty.WithPTYOptions(pty.WithSSHRequest(ssh.Pty{
46+
opts:=pty.WithPTYOption(pty.WithSSHRequest(ssh.Pty{
4747
Window: ssh.Window{
4848
Width:80,
4949
Height:24,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp