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.
I upgraded to WSL2 and this stopped working. By making the script accept mounts of type
9p
in addition todrvfs
, I got it to work easily.WSL2 also mounts
tools on /init type 9p
, so the script thoughtTO
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.