gitcopy doesn't work with capistrano-rvm
Closed this issue · 5 comments
This line of code is the issue...
Since this gem is using capture
instead of execute :ruby, '--args'
capistrano-rvm cannot plug in the rvm:hook
task for this command. I spent a lot of time troubleshooting this one and took a lot of wrong turns trying to get Cap3 to work with a login shell, trying to rewrite the gitcopy:deploy
task to include the rvm:hook
among others... Once I finally figured out how capistrano-rvm was injecting the call to RVM the solution was an easy one.
If you have any questions, please let me know... I'll be submitting a pull request shortly.
PR submitted... Thanks, @xuwupeng2000.
One question I have regarding this rvm:hook is, if a user is not using RVM, would your changes still work for them?
It will... It simply replaces the capture
call with execute :ruby, '--arguments'
. If users aren't using capistrano-rvm it will simply work as normal. However, since the line now uses execute :ruby
, capistrano-rvm can inject a wrapper around that call to use RVM if necessary.
Awesome !
Thank you
Thanks for merging that in so quickly!