mina sets every command run(:local) to :local when if run(:remote) was not explicitly called
nineten opened this issue · comments
I notice that when even thou the documentation states that the default is backend is set to :remote
,
it does not explicitly do so and this causes all commands before the run(:local)
to run in :local
which is
the wrong environment.
Probably due to run(:local)
setting the @backend
to :local
eg.
in deploy.rb
task :setup do
invoke :'nginx:setup'
run(:local) do
invoke :'setup_rails_env'
end
end
will cause nginx:setup to run in :local
task :setup do
run(:remote) do
invoke :'nginx:setup'
end
run(:local) do
invoke :'setup_rails_env'
end
end
will make sure nginx:setup is is run in :remote
task :setup do
run(:remote) do
# something else
end
invoke :'nginx:setup'
run(:local) do
invoke :'setup_rails_env'
end
end
that something else
will run in :remote
while nginx:setup
runs in local