Vincent Robert
b025dfcf58
Add \r to IFS instead of removing it manually
před 12 roky
Vincent Robert
f50cee2ac7
Simplify bash expression
před 12 roky
Vincent Robert
2fd3b18d39
Remove carriage return characters in version file
When created on Windows, .rbenv-version or .ruby-version files may have CR characters that will prevent rbenv from correctly parsing the Ruby version. Discard those characters when reading the file.
před 12 roky
wmoxam
2f5d9a6f90
Fixes rbenv on OpenBSD and any other systems that don't support head -c
před 12 roky
Mislav Marohnić
681435e0b4
Simplify version-file-read to avoid process substitution
Process substitution seems to be causing problems with some versions of
bash on specific systems.
Fixes #401
před 12 roky
Sam Stephenson
37eca782cc
Documentation tweaks
před 13 roky
Mislav Marohnić
3436bddaea
new-style documentation for most commands
před 13 roky
Mislav Marohnić
21391c8d2f
put up a note why `version-file-read` is tricky
před 13 roky
Joshua Peek
149e61a649
Don't exit out of piped loop
Can cause the stdin of cat to close too soon causing:
echo: write error: Broken pipe
Fixes #97
před 15 roky
Sam Stephenson
0632325a43
Set RBENV_DEBUG=1 to see what's going on under the hood
před 15 roky
Sam Stephenson
e5c0fd22e1
Exit with 0 status when a version file is read successfully
před 15 roky
Sam Stephenson
db2a94d4bc
`rbenv-version-name` returns `system` for empty version files. Closes #62 , #65 , #77 .
před 15 roky
Sam Stephenson
837bfc5aa9
Fix rbenv-version-file-read for version files without trailing newlines
před 15 roky
Sam Stephenson
506bc3634f
Extract rbenv-version-file{,-read,-write}
před 15 roky