svetlyak40wt / dotfiler

Shell agnostic git based dotfiles package manager, written in Python.
238 stars 31 forks source link

Dotfiler not portable across Ubuntu Bash on Windows #20

Open cybtachyon opened 6 years ago

cybtachyon commented 6 years ago

When running dot update, it does not properly recognize and handle existing symlinks when inside a symlinked home directory on Ubuntu Bash on Windows.

testuser@pc:~$ dot update
CANT LINK: /home/testuser/.bash_profile -> /mnt/c/Users/testuser/.dotfiles/base/.bash_profile
Traceback (most recent call last):
  File "/home/testuser/.dotfiles/bin/dot", line 43, in <module>
    arguments)
  File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 441, in update
    created_links = processor(remove_actions + actions, created_links, fs)
  File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 77, in processor_real
    mapping[action[0].replace('-', '_')](*action[1:])
  File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 63, in link
    fs.symlink(source, target)
  File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/real_filesystem.py", line 28, in symlink
    os_symlink(source, link_name)
OSError: [Errno 17] File exists
svetlyak40wt commented 6 years ago

OMG, ubuntu bash on windows? What is this beast?

On 13 Apr 2018, at 08:10, cybtachyon notifications@github.com wrote:

When running dot update, it does not properly recognize and handle existing symlinks when inside a symlinked home directory on Ubuntu Bash on Windows.

dreese@samhost:~$ dot update CANT LINK: /home/testuser/.bash_profile -> /mnt/c/Users/testuser/.dotfiles/base/.bash_profile Traceback (most recent call last): File "/home/testuser/.dotfiles/bin/dot", line 43, in arguments) File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 441, in update created_links = processor(remove_actions + actions, created_links, fs) File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 77, in processorreal mapping[action[0].replace('-', '')](*action[1:]) File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/core.py", line 63, in link fs.symlink(source, target) File "/mnt/f/Users/testuser/.dotfiles/bin/lib/dot/real_filesystem.py", line 28, in symlink os_symlink(source, link_name) OSError: [Errno 17] File exists — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

svetlyak40wt commented 6 years ago

Anyway, I don't have a Windows. Feel free to fix the issue.

cybtachyon commented 5 years ago

This is potentially resolved by the introduction of WSL2. I will close this issue if it is resolved after testing.

fniessen commented 4 years ago

FYI, I'm using dotfiler for a couple of days, on Windows, with WSL1. And it works just fine.