Skip to content
Snippets Groups Projects
Commit f4faa2e8 authored by Daniele Sluijters's avatar Daniele Sluijters Committed by Bruno Pinto
Browse files

Fix some issues with the usage of RBENV_ROOT.

`RBENV_ROOT` can be used to relocate where rbenv ends up storing the shims
and versions of Ruby it installs. Because of this split `RBENV_ROOT`
cannot be used to reliably construct a path to the rbenv binary itself.

Instead we now rely on `$RBENV_BIN_ROOT` pointing to the `bin/` directory
containing the rbenv binary/script.

If `$RBENV_BIN_ROOT` is not set we search `$PATH` first and then the
user's home directory making sure to prepend the necessary directories to
our `$PATH` depending on where we find rbenv.

Lastly we prepend to our `$PATH` the location rbenv's `shims/` so that we
can find the shims rbenv generates for us.
parent 30f35666
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment