mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-17 07:43:46 -05:00
Stop using abs_dirname() in rbenv-init
It's slow and not necessary since we expect `$0` to already be expanded.
In tests this change forces us to deal with some relative paths, but
it's not a big deal. The `rbenv init -` output in the most common case
will be the same as before:
source '/home/myuser/.rbenv/libexec/../completions/rbenv.bash'
This commit is contained in:
@@ -21,7 +21,7 @@ load test_helper
|
||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||
run rbenv-init - bash
|
||||
assert_success
|
||||
assert_line "source '${root}/libexec/../completions/rbenv.bash'"
|
||||
assert_line "source '${root}/test/../libexec/../completions/rbenv.bash'"
|
||||
}
|
||||
|
||||
@test "detect parent shell" {
|
||||
@@ -35,7 +35,7 @@ load test_helper
|
||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||
run rbenv-init - fish
|
||||
assert_success
|
||||
assert_line ". '${root}/libexec/../completions/rbenv.fish'"
|
||||
assert_line ". '${root}/test/../libexec/../completions/rbenv.fish'"
|
||||
}
|
||||
|
||||
@test "fish instructions" {
|
||||
|
||||
Reference in New Issue
Block a user