Open VarunAgw opened 5 months ago
Is your drive D:
mounted in WSL? Because network drives, removable devices, etc. are not automatically available in WSL.
Does wsl /bin/bash -c 'ls -la /mnt/d/www/wm'
work inside Windows CMD/PowerShell? And is there a .git
directory in the output?
What is the output of wslpath -au 'D:\www\wm'
from within WSL?
If D:
is a local hard drive and any of these fails, it would be interesting to know whether you use WSL1 or WSL2 and which Linux distribution is used.
Hi @andy-5
Thanks for the reply
Does wsl /bin/bash -c 'ls -la /mnt/d/www/wm' work inside Windows CMD/PowerShell? And is there a .git directory in the output?
Yes and yes
$ wslpath -au 'D:\www\wm' wslpath: D:\www\wm
It's WSL 1 and Ubuntu 22
I should add it's not a local drive but a subst partition. wslgit works fine on C: Drive though
$ ls /d -alh lrwxrwxrwx 1 root root 7 Jan 11 18:14 /d -> /mnt/d/
$ ls /mnt/d -alh lrwxrwxrwx 1 root root 12 Dec 28 2021 /mnt/d -> /mnt/c/Work/
Your output
$ wslpath -au 'D:\www\wm' wslpath: D:\www\wm
indicates that wslpath
does not work. A valid output would be something like /mnt/d/www/wm
.
So it seems this is an issue with wslpath
, which cannot correctly handle the subst partition.
cd /D d:\www\wm
git status
I got