Closed hibernick closed 5 years ago
Yes, this is a known issue, as wslgit
currently does not honor settings in wsl.conf
. There is some discussion in #12 on how to fix this, but no implementation for now.
One possible temporary workaround, until this is implemented, is to use the old way of configuring your setup using bind mounts. This kind of works, but leads to other problems in some situations, as discussed in #34 .
I'll leave this issue open for now as a concise example for the wsl.conf
setup and resulting mount points.
I'd really like to see this work with /
as well. Going back to /mnt
can't happen for me. Also I tried symlinking /mnt/c
to /c
and that also didn't work.
I never compiled a Rust app before, but if you change the hard coded /mnt
to /
, would it work?
I never compiled a Rust app before, but if you change the hard coded
/mnt
to/
, would it work?
I just tried that and it works
It would be nice if you could share your compiled wslgit.exe
somewhere, because putting in place the build environment when you don't have all the required tools is really time consuming.
Maybe providing two variants, one with /
and the other with /mnt/
, if it is not complex to do, would help people forced, as I am, to switch their mounting point to /
?
If anyone needs to make it working, the 'easiest' way is to go through the installation of VS Tools 2018 + W10 SDK. I tried to use cargo+rust under WSL to generate a .exe but it's really tricky and complex to set up.
Then you will need to modify two lines:
l27 format!("/{}", drive)
and
l76 Regex::new(r"(?m-u)/(?P<drive>[A-Za-z])(?P<path>/\S*)")
And a build, and here you go, it works with a mount on root /c/here/i/am
I can share a build, if needed, but sharing .exe outside this site could be risky for the receiver.
Great! Nice to hear that it works in principle. Note, however, that this could fail in some edge cases, e.g. if the output of some translated git command contains slashes that are not part of a path (but only few git commands are actually translated).
I think many will find this useful, so I've added a new build with these changes (which are now in the mount-at-root
branch) to the latest release - just grab the wslgit-mount-at-root.exe
binary there.
I'm also closing this issue, as these changes seem to solve this specific use case.
vscode output: