capistrano / rbenv

Idiomatic rbenv support for Capistrano 3.x
MIT License
203 stars 60 forks source link

Expand home dir for user rbenv_path to support quoted ENV in SSHKit #56

Closed cshaffer closed 9 years ago

cshaffer commented 9 years ago

As a result of https://github.com/capistrano/sshkit/pull/250 for user installs of rbenv result in incorrect ENV in the mapped bins.

So what used to be this: $ RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.2 ~/.rbenv/bin/rbenv exec gem query --quiet --installed --name-matches ^bundler$

Became this: RBENV_ROOT="~/.rbenv" RBENV_VERSION="2.2.2" ~/.rbenv/bin/rbenv exec gem query --quiet --installed --name-matches ^bundler$

In other words path expansion was no longer occurring due to the quotes added by SSHKit. This is easy to workaround by overriding the default rbenv_path property, however this PR sets the default to the expanded path so that is no longer necessary.

cshaffer commented 9 years ago

Whoops looks like deploy_user isn't valid anymore: https://github.com/capistrano/capistrano/issues/1399. Closing until I come up with a better way.