You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm opening this issue to discuss the best way to add Windows support, along with what I've found so far. I'd be happy to contribute a Windows implementation, including tests, but will require your guidance in order to do so effectively.
The current implementation of localexec_windows.go is an empty stub. By copying the implementation from localexec_unix.go and removing the non-portable Linux-specific parts (syscall, UID/GID), I was able to get a partial implementation running on Windows 10 under MinGW (Git Bash). I don't know if this is one of your near-term goals, but I thought you might be interested nonetheless.
Some caveats of the example I hacked together:
I didn't implement TTY support or Resize
A bunch of the integration tests are still failing
This required a modification to ./dev/client/main.go to remove the build tag and comment out the SIGWINCH signals
If I use the Command Prompt to start the server, then the results aren't as nice, however:
C:\projects\wsep>go run ./dev/server
2020-11-29 12:04:17 ERROR failed to serve execer: start command: exec: "dir": executable file not found in %PATH%
2020/11/29 12:04:17 websocket: failed to marshal close frame: status code StatusAbnormalClosure cannot be set
exit status 2
A similar issue for PowerShell, too:
PS C:\projects\wsep> go run ./dev/server
2020-11-29 12:02:31 ERROR failed to serve execer: start command: exec: "ls": executable file not found in %PATH%
2020/11/29 12:02:31 websocket: failed to marshal close frame: status code StatusAbnormalClosure cannot be set
2020-11-29 12:02:45 ERROR failed to serve execer: start command: exec: "dir": executable file not found in %PATH%
2020/11/29 12:02:45 websocket: failed to marshal close frame: status code StatusAbnormalClosure cannot be set
exit status 2
PS C:\projects\wsep> dir
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 11/29/2020 11:22 .github
d----- 11/29/2020 11:22 browser
d----- 11/29/2020 11:22 ci
d----- 11/29/2020 11:22 dev
d----- 11/29/2020 11:22 internal
-a---- 11/29/2020 11:22 7 .gitignore
-a---- 11/29/2020 11:22 5276 client.go
-a---- 11/29/2020 11:22 3552 client_test.go
-a---- 11/29/2020 11:22 223 doc.go
-a---- 11/29/2020 11:22 1813 exec.go
-a---- 11/29/2020 11:22 432 go.mod
-a---- 11/29/2020 11:22 28298 go.sum
-a---- 11/29/2020 11:22 1083 LICENSE.txt
-a---- 11/29/2020 11:22 1022 localexec.go
-a---- 11/29/2020 11:22 3415 localexec_test.go
-a---- 11/29/2020 11:22 2279 localexec_unix.go
-a---- 11/29/2020 11:35 1381 localexec_windows.go
-a---- 11/29/2020 11:22 2360 README.md
-a---- 11/29/2020 11:22 3732 server.go
-a---- 11/29/2020 11:22 1283 tty_test.go
The text was updated successfully, but these errors were encountered:
Ah, upon a closer look, this seems like full support will depend on creack/pty#109 or another one of the solutions discussed in this issue: creack/pty#95
I'm opening this issue to discuss the best way to add Windows support, along with what I've found so far. I'd be happy to contribute a Windows implementation, including tests, but will require your guidance in order to do so effectively.
The current implementation of localexec_windows.go is an empty stub. By copying the implementation from localexec_unix.go and removing the non-portable Linux-specific parts (syscall, UID/GID), I was able to get a partial implementation running on Windows 10 under MinGW (Git Bash). I don't know if this is one of your near-term goals, but I thought you might be interested nonetheless.
Some caveats of the example I hacked together:
Here's what I have working so far:
If I use the Command Prompt to start the server, then the results aren't as nice, however:
A similar issue for PowerShell, too:
The text was updated successfully, but these errors were encountered: