octopress / deploy

Deployment for Octopress and Jekyll blogs.
MIT License
75 stars 23 forks source link

rsync tries relative path when specifying absolute #18

Closed thany closed 10 years ago

thany commented 10 years ago

Here's the relevant part of my _deploy.yml:

method: rsync
site_dir: _site
user: swadmin@192.168.1.53
remote_path: /var/www/keytec

And the error:

Syncing _site files to var/www/keytec with rsync.
swadmin@192.168.1.53's password:
sending incremental file list
rsync: mkdir "/home/swadmin/var/www/keytec" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(605) [Receiver=3.0.9]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /usr/src/ports/rsync/rsync-3.0.9-1/src/rsync-3.0.9/io.c(605) [sender=3.0.9]

It seems it tries /var/www/keytec as a path relative from the user's home directory, even though it starts with a slash - which indicates it is an absolute path.

thany commented 10 years ago

Workaround:

remote_path: //var/www/keytec

I would say if it needs to be a relative path, it should start with anything other than a slash (like ./ or ../ or what have you, or a directory name). Absolute paths start with a single slash, as far as I'm aware.

imathis commented 10 years ago

The problem was that I was stripping out leading forward slashes on the remote_path. I've removed that code so this should work fine with #21 is merged.