Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot track files with characters that needs escaping #67

Closed
kastermester opened this issue Dec 4, 2013 · 8 comments
Closed

Cannot track files with characters that needs escaping #67

kastermester opened this issue Dec 4, 2013 · 8 comments
Assignees
Labels

Comments

@kastermester
Copy link

$ homeshick track rc-files Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Default\ \(OSX\).sublime-keymap 
      symlink /Users/khs/.homesick/repos/rc-files/home/Library/Application to /Users/khs/Library/Application
        error The file /Users/khs/Library/Application does not exist.
@kastermester
Copy link
Author

It works now if I manually create the folders in my castle that I am trying to track against. (ie homeshick cd rc-files && mkdir -p 'home/Librrary/Application Support/Sublime Text 3/Packages/User') Otherwise a fatal error happens when doing homeshick track

@kastermester
Copy link
Author

I may have been a bit too fast to say that it works. The track command works. But the link command does some very funky things...

@andsens
Copy link
Owner

andsens commented Dec 4, 2013

Ugh, details. Bloody friggin' details....

@andsens andsens reopened this Dec 4, 2013
andsens added a commit that referenced this issue Dec 4, 2013
Unit test for when the folder structure contains a space instead of just the filename
@andsens
Copy link
Owner

andsens commented Dec 4, 2013

OK, so the track bug should be properly fixed now.
Any chance you can reproduce the bug by adding it to the repo fixture?

@kastermester
Copy link
Author

If I had the slightest clue on how to run the tests and all that (and how to write proper bash scripts...) then sure :)

andsens pushed a commit that referenced this issue Dec 5, 2013
@andsens andsens closed this as completed in b9b679d Dec 5, 2013
andsens added a commit that referenced this issue Dec 11, 2013
@andsens
Copy link
Owner

andsens commented Dec 11, 2013

Try giving it a spin now. There shouldn't be any more trouble with spaces in paths.

@kastermester
Copy link
Author

khs@khs ~ » ls -l Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
total 560
-rw-r--r--  1 khs  admin     4B Apr 24  2013 Default (Linux).sublime-keymap
lrwxr-xr-x  1 khs  admin   126B Dec  5 15:13 Default (OSX).sublime-keymap -> /Users/khs/.homesick/repos/rc-files/home/Library/Application Support/Sublime Text 2/Packages/User/Default (OSX).sublime-keymap
-rw-r--r--  1 khs  admin     4B Apr 24  2013 Default (Windows).sublime-keymap
drwxr-xr-x  2 khs  admin     4B Dec  5 15:13 Package Control.cache
-rw-r--r--  1 khs  admin    10B Dec  8 15:58 Package Control.last-run
-rw-r--r--  1 khs  admin   252B Dec  5 18:36 Package Control.sublime-settings
-rw-r--r--  1 khs  admin   271K Dec  5 15:13 Package Control.system-ca-bundle
lrwxr-xr-x  1 khs  admin   126B Dec  5 15:13 Preferences.sublime-settings -> /Users/khs/.homesick/repos/rc-files/home/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings
-rw-r--r--  1 khs  admin    32B Apr 28  2013 Puppet.sublime-settings
-rw-r--r--  1 khs  admin    41B Apr 28  2013 Ruby.sublime-settings
khs@khs ~ » rm Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings 
khs@khs ~ » homeshick symlink
     conflict .homeshick exists
   overwrite? [yN] 
      ignored oh-my-zsh
    identical .profile
    identical .zshrc
    identical .inputrc
    identical .bashrc
    identical .ssh
    identical .ssh/config
    identical Library
    identical Library/Preferences
    identical Library/Preferences/com.cocoatech.PathFinder.plist
    identical Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist
     conflict Library/Preferences/com.apple.Terminal.plist exists
   overwrite? [yN]

That was the end of it. In short - symlink did not link the file for me :(

Oh and fyi - i never got to say yes or no to overwriting the files either.

@andsens andsens reopened this Dec 12, 2013
@andsens
Copy link
Owner

andsens commented Dec 12, 2013

ffs, that'll teach me to not use process substitution for iterating through data.
The files are fed into the loop so we can separate stuff with \0. Problem is, anything reading from STDIN inside the loop will get all that data as well. The spaces problem is actually solved but your files are not linked because their paths are swallowed by the prompt. Try running it with --batch, --skip or --force, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants