capistrano / capistrano/rvm

:hook gets in the way during fresh install

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
140
Forks
44
PR merge metrics
No merged PRs in 30d

Description

I have a few tasks wrapped under `setup:deploy` to prepare a new instance. As I deploy for the first time, `rvm:hook` gets executed very early on and prevents me from doing my own rvm installation:

```
namespace :rvm do
task :install do
on roles(:all), in: :sequence do
execute %q(gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3)
execute %q(\curl -sSL https://get.rvm.io | bash -s stable --autolibs=3 --ruby=2.2.1)
end
end
end
```

The line `after stage, 'rvm:hook'` (of this gem) starts `rvm:hook` before my `rvm:install` runs. It fails, obviously, but also does not let me proceed to install rvm. I went around that by forcing my task to run earlier: `before :hook, :install`, - but that obviously would run each time I ran `cap production deploy`, which is not what I want.

Ideally, I'd prefer the gem to provide its own `:install` which would let me install rvm in an independent execution - something that I could then include in my own task for setting up new instances. Either that - or tie `:hook` to a later stage that would not be executed before tasks that are not code deploys.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.