Commit graph

14 commits

Author SHA1 Message Date
Mislav Marohnić
ca25259900 Allow explicit target directory argument to rbenv-version-file
Can be used for `.ruby-version` file lookup in the ancestry of a
specific directory. In this mode of operation, global version files
aren't taken into consideration, and the command fails unless a local
version file was found.
2015-12-23 15:19:54 +01:00
Mislav Marohnić
51a1ee06e4 Merge commit '5c1094a' from #529
Closes #529
2015-10-10 19:17:18 +02:00
Mislav Marohnić
43b28caa94 Fix discovering .ruby-version files in root directory
It's not that this is a preferred way to set a global version (one
should use `rbenv global <version>` instead), but this fixes the
function purely for correctness: all parent directories should be
scanned, even the root directory.

Fixes #745
2015-06-09 17:24:15 +02:00
kou1okada
5c1094adb9 Response enhancement for in the case of the working directory under the UNC path.
finding_local_version_file is extremely slow, when working directory is under the UNC path.
Because //host/.rbenv-version and //.rbenv-version do not exist, but testing them is so slow.
It's the reason to make a serious delay of the response, when the Ruby runs with a current working directory under the UNC path under Cygwin environment.

A response of before applying this patch.
//somehost/somedir $ time ruby -e "exit"

real    0m13.922s
user    0m0.168s
sys     0m0.287s

A response of after applying this patch.
//somehost/somedir $ time ruby -e "exit"

real    0m0.721s
user    0m0.153s
sys     0m0.319s
2014-01-09 15:31:29 +09:00
Sam Stephenson
b974bf54dc Prefer .ruby-version to .rbenv-version for reading local versions 2012-12-30 18:35:20 -06:00
Mislav Marohnić
3436bddaea new-style documentation for most commands 2012-12-29 23:34:53 +01:00
Sam Stephenson
6c1fb9ffd0 Fall back to $PWD if a local version file can't be found in $RBENV_DIR 2012-12-27 13:39:36 -06:00
Sam Stephenson
0a4ffcd15f Global version file is now ${RBENV_ROOT}/version
This is the last time it'll change. Promise.
2011-09-28 09:45:58 -05:00
Sam Stephenson
07815769ae RBENV_DIR sets the directory from which .rbenv-version files are scanned 2011-09-27 15:50:39 -05:00
Sam Stephenson
0632325a43 Set RBENV_DEBUG=1 to see what's going on under the hood 2011-09-12 10:11:59 -05:00
Sam Stephenson
7ac964353f RBENV_HOME -> RBENV_ROOT 2011-09-11 11:58:57 -05:00
Alexander Rinass
5130f0464a Support install locations other than $HOME/.rbenv.
Define RBENV_HOME env variable in libexec/rbenv and let all script delegates use this variable to determine rbenv's install location.
2011-08-25 09:28:01 +02:00
Sam Stephenson
5be66da9f4 Rename rbenv-default to rbenv-global 2011-08-18 14:35:00 -05:00
Sam Stephenson
506bc3634f Extract rbenv-version-file{,-read,-write} 2011-08-18 14:11:40 -05:00