Skip to content

Dotfiler confused when moving directories between environments #21

@karepker

Description

@karepker

I recently moved some files across environments. In my "default" environment, I used to have .vim/ftplugin/. I moved this directory (and a few other sudirectories in my .vim/ directory) to my "personal" environment and ran dot update (note: I use a custom base_dir).

It appears dotfiler was confused by this move. It successfully removed the original symlinks to my default environment, but then did not create new symlinks to my personal environment. When I ran it again it created the new symlinks successfully.

Here's its log from the first run (with a few irrelevant updates omitted):

RM	Symlink /home/karepker/.vim/ftdetect was removed.
RM	Symlink /home/karepker/.vim/ftplugin was removed.
RM	Symlink /home/karepker/.vim/syntax was removed.
RM	Symlink /home/karepker/.bash.d/alias_personal.bash was removed.
RM	Symlink /home/karepker/.bash.d/command_personal.bash was removed.
RM	Symlink /home/karepker/.vim/indent was removed.
Traceback (most recent call last):
  File "/home/karepker/links/third_party/dotfiler/bin/dot", line 43, in <module>
    arguments)
  File "/home/karepker/links/third_party/dotfiler/bin/lib/dot/core.py", line 441, in update
    created_links = processor(remove_actions + actions, created_links, fs)
  File "/home/karepker/links/third_party/dotfiler/bin/lib/dot/core.py", line 77, in processor_real
    mapping[action[0].replace('-', '_')](*action[1:])
  File "/home/karepker/links/third_party/dotfiler/bin/lib/dot/core.py", line 58, in rm
    fs.rm(dir)
  File "/home/karepker/links/third_party/dotfiler/bin/lib/dot/real_filesystem.py", line 18, in rm
    os.unlink(path)
OSError: [Errno 2] No such file or directory: '/home/karepker/.vim/ftdetect'

And here's what happened on the second run:

LINK	Symlink from /home/karepker/.vim/ftdetect to /home/karepker/links/personal/settings/personal/.vim/ftdetect was created
LINK	Symlink from /home/karepker/.vim/ftplugin to /home/karepker/links/personal/settings/personal/.vim/ftplugin was created
LINK	Symlink from /home/karepker/.vim/indent to /home/karepker/links/settings/personal/.vim/indent was created
LINK	Symlink from /home/karepker/.vim/syntax to /home/karepker/links/personal/settings/personal/.vim/syntax was created

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions