Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 35e31de

Browse files
committed
Make pty terminal raw
Fixes bcmi-labs/webide#2559 and stdout echo
1 parent 01f5235 commit 35e31de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

handlers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/kr/pty"
2121
nats "github.com/nats-io/go-nats"
2222
"github.com/pkg/errors"
23+
"golang.org/x/crypto/ssh/terminal"
2324
)
2425

2526
// StatusCB replies with the current status of the arduino-connector
@@ -466,6 +467,8 @@ func spawnProcess(filepath string, sketch *SketchStatus, status *Status) (int, i
466467

467468
f, err := pty.Start(cmd)
468469

470+
terminal.MakeRaw(int(f.Fd()))
471+
469472
if err != nil {
470473
fmt.Println(fmt.Sprint(err) + ": " + stderr_buf.String())
471474
return 0, stdout, stderr, err

0 commit comments

Comments
 (0)