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

use rbenv-root command instead of env var #19

Merged
merged 3 commits into from
Mar 30, 2015

Conversation

jasonkarns
Copy link
Collaborator

rbenv guarantees that $RBENV_ROOT exists within the environment in which an rbenv plugin runs. There is no need to shell out to rbenv-root to get that value (all it does is echo $RBENV_ROOT, anyhow).

  • change the binary to change dir via $RBENV_ROOT exclusively

However, $RBENV_ROOT may not exist when a user is directly installing rbenv-update. So the installation instructions should rely on $(rbenv root) which will provide the default value if $RBENV_ROOT isn't set by the user.

  • update readme install instructions to use $(rbenv root)

@jasonkarns
Copy link
Collaborator Author

I'm not sure if #2 was an issue prior to rbenv ensuring $RBENV_ROOT exists, but we should rely on the env var as guaranteed by rbenv itself. This avoids an additional shell-call.

@jasonkarns
Copy link
Collaborator Author

this also makes #9 moot

jasonkarns added a commit that referenced this pull request Mar 30, 2015
use rbenv-root command instead of env var
@jasonkarns jasonkarns merged commit 520aa9e into rkh:master Mar 30, 2015
@jasonkarns jasonkarns deleted the rbenv-root-command branch March 30, 2015 15:30
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.

1 participant