rcm icon indicating copy to clipboard operation
rcm copied to clipboard

Weird behavior with folders having space character in their name

Open ghost opened this issue 7 years ago • 6 comments

Consider the following example

You have your dotfiles directory containing a folder named "A B". Then, after running rcup, everything is fine, except that a folder named "B" is created right where you started the rcup command. I think this is an error.

ghost avatar Aug 10 '18 20:08 ghost

I'm having the same issue.

jsatk avatar Oct 23 '18 03:10 jsatk

To add some clarity, I have two Dropbox's connected — a Personal and a Work. In ~ I have Dropbox (Personal) and Dropbox (Work). ~/Dropbox (Personal)/dotfiles is where I keep my dotfiles. I have a Makefile in there that symlinks everything. I was recently introduced to rcm and decided to try it. But I cannot figure out for the life of me how to set DOTFILES_DIRS in ~/.rcrc to ~/Dropbox (Personal)/dotfiles. To get around this I symlinked ~/Dropbox (Personal)/dotfiles to ~/.dotfiles — but this isn't my favorite solution.

jsatk avatar Oct 23 '18 17:10 jsatk

I believe it! Filenames with spaces and shell are a bad mix.

This is a great bug report, though -- it can clearly and simply be reproduced. I'll see if I can track down why such directories are breaking, and if it can be fixed.

mike-burns avatar Aug 28 '20 18:08 mike-burns

I'm having an issue with vscode open source release config. rcm thinks the config file is unlinked but correctly sets it up. Whenever I run rcup, I get this:

replacing identical but unlinked /home/marco/.config/Code - OSS/User/settings.json
removed '/home/marco/.config/Code - OSS/User/settings.json'
'/home/marco/.dotfiles/tag-vscode/config/Code - OSS/User/settings.json' -> '/home/marco/.config/Code - OSS/User/settings.json'

ubmarco avatar Oct 15 '21 06:10 ubmarco

I'm having this same issue because I'm trying to manage MailMate custom keybinding configs in my rcm dotfiles repo. I want it to symlink the Library/Application Support/MailMate/Resources/KeyBindings directory, and I escaped the space when listing it in ~/.rcrc's SYMLINK_DIRS variable, but the path still always symlinks the individual file inside. 😕

vergenzt avatar Jul 12 '22 21:07 vergenzt

I have the same problem. Reading through the code I see that only one line needs to be changed to fix this problem:

https://github.com/thoughtbot/rcm/blob/ef34b0b0a664557ed0d276acffda3434acd49066/bin/rcup.in#L128-L138

in line 133 the $dest should be quoted, i.e.

    local link_dest=$(readlink "$dest")

Patching this locally in /usr/bin/rcup "works for me".

jest avatar Sep 09 '23 15:09 jest