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

fix issues with rbenv:load #411

Merged
merged 3 commits into from
Aug 9, 2016
Merged

Conversation

devvmh
Copy link
Contributor

@devvmh devvmh commented Aug 8, 2016

I put the rbenv:load call in my deploy.rb inside an in_path call like so:

task :environment do
  in_path(fetch(:deploy_to)) do
    invoke :'rbenv:load'
  end
end

This caused a zsh parse error (and I'm assuming bash would have the same problem) because the shell script came out as:

(cd /deploy/path/current && echo "-----> Loading rbenv" && export RBENV_ROOT='$HOME/.rbenv' && export PATH='$HOME/.rbenv/bin:$PATH' &&  (
    if ! which rbenv >/dev/null; then
      echo "! rbenv not found"
      echo "! If rbenv is installed, check your :rbenv_path setting."
      exit 1
    fi )
   && eval "$(rbenv init -)")

@@ -3,13 +3,13 @@
task :'rbenv:load' do
comment 'Loading rbenv'
command "export RBENV_ROOT='#{fetch(:rbenv_path)}'"
command "export PATH='#{fetch(:rbenv_path)}/bin:$PATH'"
command %(
command %(export PATH="#{fetch(:rbenv_path)}/bin:$PATH")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, and these single quotes are causing issues regardless of using in_path

@devvmh devvmh changed the title enable running rbenv:load inside of in_path fix issues with rbenv:load Aug 8, 2016
@d4be4st d4be4st merged commit 1f7bc4c into mina-deploy:master Aug 9, 2016
@devvmh devvmh deleted the fix/rbenv branch August 10, 2016 01:38
@devvmh devvmh mentioned this pull request Aug 10, 2016
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

Successfully merging this pull request may close these issues.

2 participants