Error running on Windows 10 20.04 WSL2 Ubuntu 20.04
ukdoc opened this issue · 3 comments
Describe the bug
Upgraded to windows 10 20.04 pro. Running Ubuntu 20.04 under WSL2.
Have tried converting my old WSL1 to WSL2 and a new clean WSL2.
If my home directory is sym-linked to another location then although i can install it, it produces errors when you run the script.
If my home directory is just a plain directory everything works as expected.
I known this is a bit of an odd use scenario but i am at a loss as to why it works one way and not the other.
To Reproduce
Working method
dave@psiPC7:/home$ ls -la
lrwxrwxrwx 1 root root 37 Jun 7 17:32 dave -> /mnt/c/Users/Dave/Documents/LinuxHome
drwxr-xr-x 3 dave dave 4096 Jun 14 16:50 dave2
dave@psiPC7:/home$ cd dave2
dave@psiPC7:/home/dave2$ ls -la
drwxr-xr-x 10 dave dave 4096 Jun 14 16:50 .asdf
dave@psiPC7:/home/dave2$ source .asdf/asdf.sh
dave@psiPC7:/home/dave2$ asdf version
v0.7.8-f5c7dae
non-Working method
dave@psiPC7:/home$ cd dave
dave@psiPC7:~$ source .asdf/asdf.sh
dave@psiPC7:~$ asdf version
/home/dave/.asdf/lib/commands/command-version.bash: line 2: asdf_version: command not found
dave@psiPC7:~$ asdf plugin list
/home/dave/.asdf/lib/commands/command-plugin-list.bash: line 5: get_plugin_path: command not found
/home/dave/.asdf/lib/commands/command-plugin-list.bash: line 48: display_error: command not found
Environment
OS: Windows 10 Pro 20.04 WSL2 Ubuntu 20.04
asdf version: Latest release as well as the HEAD release
I would suggest keeping your Unix configuration in the Unix specific filesystem. While mnt/c/*
is able to be traversed in the WSL session, this does not mean the filesystem is the same as the Unix filesystem. I know WSL2 is not fully integrated with the Windows filesystem so I could see this being a special case.
I would suggest keeping source
.asdf/asdf.shin your
.bashrc/
.zshrcin the Unix default Home dir. Once initialised this way you **might** be able to use
asdfin the
mnt/c/*dirs, though I am not sure this expectation is aligned with the goals of WSL and given
asdfworks in the Unix specific filesystem would not call this a bug with
asdf`.
I was hoping to not have to sync my WSL home drive into windows so that it gets backed up, but it is a very odd usage scenario i have to agree. I think i will stick to a native home directory and just sym-link work folders and sync the rest of the files.
Thanks for looking again at this.
@ukdoc I think it is a valid usage, I would like to do the same on my Windows setup, but until MS integrate the filesystems better I am just sticking with the default Unix $HOME
for now.
With the config in the Unix $HOME
and sourced via your Shell's .rc
file you may find that asdf
works in the /mnt/c/*
filesystem. I haven't my Windows machine available atm to check. I suspect as long as the .asdf/
dir and your .{bash,zsh}rc
file is in the Unix $HOME
that asdf
would work in the other dirs.
Though in each case I do not think this is an asdf
bug.
Hopefully MS speed up development of WSL2 😄