wslgit icon indicating copy to clipboard operation
wslgit copied to clipboard

Add support for 9p mounts in WSL2

Open rennex opened this issue 5 years ago • 1 comments

I upgraded to WSL2 and this stopped working. By making the script accept mounts of type 9p in addition to drvfs, I got it to work easily.

WSL2 also mounts tools on /init type 9p, so the script thought TO is a drive letter. I added a check for : as the second character.

Unfortunately, this doesn't work yet with repos that reside on the Linux disk. Their paths would be simpler to convert: /home/x/repo/ in Linux is e.g. \\wsl$\Ubuntu\home\x\repo\ in Windows. However, running a .bat script in a UNC path prints a warning (and it's only possible to run it in PowerShell). I'm not sure if that can be fixed.

rennex avatar Oct 02 '19 13:10 rennex

@hangxingliu hey there, any plans to get this is in?

@rennex you could use the wslpath utility for that, afaik

Stanzilla avatar Mar 05 '20 08:03 Stanzilla