-
Notifications
You must be signed in to change notification settings - Fork 25
Vagrant output doesn't wrap correctly #37
Comments
That behaviour is caused by the Windows Console. For other programs (e.g. I think I'll make that be launched automatically at the beginning of each session. I would prefer to find the equivalent Win32 calls that fix everything, but the win32 calls tracing feature of windbg is actually broken in Win10 (how do MS devs debug their stuff with broken tools?!?) and I had no more luck with other 3rd party tools, so I think I'll just go with launching |
With tmux running |
I'm using a wrapper script to play nice with the rest of the tooling. So far, tried two solutions that work: #!/bin/sh
wcmd echo. > \\\\.\\NUL
wrun vagrant $@
exit $? ^ basically @xilun's solution, but redirected to the NUL device (i.e Windows's equivalent for /dev/null) to avoid printing an extra line After bit of RTFM'ing, I've settled for: #!/bin/sh
wrun --force-redirects vagrant $@
exit $? |
Some technical details: cmd.exe changes the Console modes (probably as with SetConsoleMode) and cbwin doesn't touch it (except in an experimental branch). The --force-redirects prevents the Win32 process from accessing the console at all (well, if it really wants to, it can reopen it, but most Win32 program won't do that...), because it redirects stdin, out and err to TCP sockets to the WSL side, where the launcher copy the data from/to its own TTY fds. One of the drawback of how I implemented redirections is that it breaks flow control a little on stdin, because even if the Win32 process would never have read any data, the WSL caller will read and send any stdin data through the socket, until its buffer are full. I can't do much about that, but I think MS interop (for now in Insider versions only) can directly bridge a WSL pipe end to Win32 pipe end, so hopefully that kind of imperfect behaviour will be avoided with native MS interop. |
See image above. Basically, when I run commands like
wrun vagrant up
, the Vagrant output doesn't wrap correctly, and it's really hard to read the output.I glanced through other open issues, and didn't see one that was directly related, but feel free to close if there's another open issue that would describe/help fix this behavior.
The text was updated successfully, but these errors were encountered: