Hi,
I'm working against capistrano 3.8 with capistrano-symfony 1.0.0.rc2 and I'm receiving the following error when deploying to an application with more than one host configured:

Due to the nature of Rake each task can only be invoked once (unless manually reset with Rake::Task[...].reenable). Task symfony:set_permissions on line 61 of lib/capistrano/tasks/symfony.rake calls Capistrano DSL method invoke inside an on block:
task :set_permissions do
on release_roles :all do
if fetch(:permission_method) != false
invoke "deploy:set_permissions:#{fetch(:permission_method).to_s}"
end
end
end
This means that if there are multiple hosts defined and release_roles :all returns more than one then the call to invoke happens more than once. Looking at the implementation of task deploy:set_permissions:acl for example, we see that it filters the hosts itself anyway:
task :acl => [:check] do
...
on roles fetch(:file_permissions_roles) do |host|
...
... and therefore applying a filter in symfony:set_permissions won't do anything anyway. Proposed fix is to remove the filtering:
task :set_permissions do
if fetch(:permission_method) != false
invoke "deploy:set_permissions:#{fetch(:permission_method).to_s}"
end
end
Hi,
I'm working against capistrano
3.8with capistrano-symfony1.0.0.rc2and I'm receiving the following error when deploying to an application with more than one host configured:Due to the nature of Rake each task can only be invoked once (unless manually reset with
Rake::Task[...].reenable). Tasksymfony:set_permissionson line 61 oflib/capistrano/tasks/symfony.rakecalls Capistrano DSL methodinvokeinside anonblock:This means that if there are multiple hosts defined and
release_roles :allreturns more than one then the call toinvokehappens more than once. Looking at the implementation of taskdeploy:set_permissions:aclfor example, we see that it filters the hosts itself anyway:... and therefore applying a filter in
symfony:set_permissionswon't do anything anyway. Proposed fix is to remove the filtering: