Skip to content

feat: Add support for executing processes with Windows ConPty #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SSH server now works on Windows
  • Loading branch information
kylecarbs committed Feb 17, 2022
commit 12ffaff17ce186b4db9400e52d57aaae27866e33
2 changes: 1 addition & 1 deletion agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"

"cdr.dev/slog"
"github.com/coder/coder/console/pty"
"github.com/coder/coder/peer"
"github.com/coder/coder/peerbroker"
"github.com/coder/coder/pty"
"github.com/coder/retry"

"github.com/gliderlabs/ssh"
Expand Down
3 changes: 0 additions & 3 deletions agent/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,3 @@ func TestAgent(t *testing.T) {
require.NoError(t, err)
})
}

// Read + write for input
// Read + write for output
9 changes: 5 additions & 4 deletions cli/clitest/clitest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/coder/coder/cli/clitest"
"github.com/coder/coder/coderd/coderdtest"
"github.com/coder/coder/console"
"github.com/coder/coder/pty/ptytest"
)

func TestMain(m *testing.M) {
Expand All @@ -21,11 +21,12 @@ func TestCli(t *testing.T) {
client := coderdtest.New(t)
cmd, config := clitest.New(t)
clitest.SetupConfig(t, client, config)
cons := console.New(t, cmd)
pty := ptytest.New(t)
cmd.SetIn(pty.Input())
cmd.SetOut(pty.Output())
go func() {
err := cmd.Execute()
require.NoError(t, err)
}()
_, err := cons.ExpectString("coder")
require.NoError(t, err)
pty.ExpectMatch("coder")
}