Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mina sets every command run(:local) to :local when if run(:remote) was not explicitly called #611

Open
nineten opened this issue Mar 7, 2018 · 0 comments

Comments

@nineten
Copy link

nineten commented Mar 7, 2018

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

@nineten nineten changed the title mina sets every command before to :local when if :remote was not explicitly mina sets every command run(:local) to :local when if run(:remote) was not explicitly called Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant