You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi,
I'm working against capistrano
3.8
with capistrano-symfony1.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
). Tasksymfony:set_permissions
on line 61 oflib/capistrano/tasks/symfony.rake
calls Capistrano DSL methodinvoke
inside anon
block:This means that if there are multiple hosts defined and
release_roles :all
returns more than one then the call toinvoke
happens more than once. Looking at the implementation of taskdeploy:set_permissions:acl
for example, we see that it filters the hosts itself anyway:... and therefore applying a filter in
symfony:set_permissions
won't do anything anyway. Proposed fix is to remove the filtering:The text was updated successfully, but these errors were encountered: