Strip leading : from RBENV_HOOK_PATH

This commit is contained in:
Mislav Marohnić 2015-12-24 18:33:39 +01:00
parent 38692f97fe
commit e554cd86c3
2 changed files with 2 additions and 1 deletions

View file

@ -84,6 +84,7 @@ RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib
for plugin_hook in "${RBENV_ROOT}/plugins/"*/etc/rbenv.d; do
RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:${plugin_hook}"
done
RBENV_HOOK_PATH="${RBENV_HOOK_PATH#:}"
export RBENV_HOOK_PATH
shopt -u nullglob

View file

@ -71,5 +71,5 @@ load test_helper
@test "RBENV_HOOK_PATH includes rbenv built-in plugins" {
run rbenv echo "RBENV_HOOK_PATH"
assert_success ":${RBENV_ROOT}/rbenv.d:${BATS_TEST_DIRNAME%/*}/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks"
assert_success "${RBENV_ROOT}/rbenv.d:${BATS_TEST_DIRNAME%/*}/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks"
}