From b98eb073fa7005ec9df1aa79995972feb9718cd8 Mon Sep 17 00:00:00 2001 From: Tim Adler Date: Wed, 1 Apr 2015 15:31:03 +0200 Subject: [PATCH] Only run hook before deploy, not when stage is set --- lib/capistrano/tasks/rvm.rake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/capistrano/tasks/rvm.rake b/lib/capistrano/tasks/rvm.rake index b2845db..87d8bd3 100644 --- a/lib/capistrano/tasks/rvm.rake +++ b/lib/capistrano/tasks/rvm.rake @@ -13,6 +13,8 @@ namespace :rvm do end end + before :check, :hook + task :hook do on roles(fetch(:rvm_roles, :all)) do rvm_path = fetch(:rvm_custom_path) @@ -43,10 +45,7 @@ namespace :rvm do end end -Capistrano::DSL.stages.each do |stage| - after stage, 'rvm:hook' - after stage, 'rvm:check' -end +before :deploy, 'rvm:hook' namespace :load do task :defaults do