mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 22:33:52 -05:00
Avoid rbenv-exec calling out to rbenv-version-name twice
Running any shim (and thus `rbenv-exec`) would always execute `rbenv-version-name` twice: once in `rbenv-exec` and another time in `rbenv-which`, even though RBENV_VERSION variable would have already been populated at this point. Now RBENV_VERSION is respected within `rbenv-which`.
This commit is contained in:
@@ -72,3 +72,12 @@ SH
|
||||
assert_success
|
||||
assert_output "HELLO=:hello:ugly:world:again"
|
||||
}
|
||||
|
||||
@test "discovers version from rbenv-version-name" {
|
||||
mkdir -p "$RBENV_ROOT"
|
||||
cat > "${RBENV_ROOT}/version" <<<"1.8"
|
||||
create_executable "1.8" "ruby"
|
||||
|
||||
RBENV_VERSION= run rbenv-which ruby
|
||||
assert_success "${RBENV_ROOT}/versions/1.8/bin/ruby"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user