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

Fix local to remote dirs path #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ritaritual
Copy link

.1 Firstly ./ on my local env ( Sierra 10.13.2 and Ruby 2.5.0 ) produce this error:

rsync: link_stat "/Users/margo/project/./public/storage" failed: No such file or directory (2)

.2 Then, I think we should copy files from local_dirs to dirs, and not vice versa.

P.S. thanks for this awesome useful gem! :)

.1 Firstly `./` on my local env ( Sierra 10.13.2 and Ruby 2.5.0  ) produce this error:
```
rsync: link_stat "/Users/margo/project/./public/storage" failed: No such file or directory (2)
``` 
.2 Then, I think we should copy files from `local_dirs` to `dirs`, and not vice versa.

P.S. thanks for this awesome useful gem! :)
@ritaritual ritaritual changed the title Fix local to remote dears path Fix local to remote dirs path Feb 4, 2018
@ritaritual
Copy link
Author

Sorry! I found that this patch produce /shared/public/storage/storage on my remote...
I fixed it with / right after #{local_dirs}/

@@ -23,7 +23,7 @@ def local_to_remote(cap)
local_dirs = [cap.fetch(:local_assets_dir)].flatten

dirs.each_index do |idx|
system("rsync -a --del -L -K -vv --progress --rsh='ssh -p #{port}' ./#{dirs[idx]} #{user}@#{server}:#{cap.current_path}/#{local_dirs[idx]}")
system("rsync -a --del -L -K -vv --progress --rsh='ssh -p #{port}' #{local_dirs[idx]}/ #{user}@#{server}:#{cap.current_path}/#{dirs[idx]}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

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

Successfully merging this pull request may close these issues.

1 participant