Term sourcery again
Some checks failed
Build, Test and Push Docker Image / e2e-test (push) Failing after 4s
Build, Test and Push Docker Image / build-and-push (push) Has been skipped

This commit is contained in:
2025-11-06 22:22:23 +01:00
parent 39e1c65bfe
commit 1604e117b3
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import (
"os"
"os/exec"
"golang.org/x/crypto/ssh"
"golang.org/x/term"
"github.com/creack/pty/v2"
)
@@ -148,6 +149,9 @@ func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) {
log.Println("PTY start error:", err)
return
}
if err := term.MakeRaw(int(ptmx.Fd())); err != nil {
log.Println("MakeRaw master error:", err)
}
go func() {
defer ptmx.Close()
go io.Copy(channel, ptmx)