mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Ubuntu fix: don't use .
in place of source
If `rbenv init -` outputs `.` in place of `source` and that gets eval'd by the desktop manager via `~/.profile`, it chokes and prevents the user from logging in. Fixes #457
This commit is contained in:
parent
71a6d791c2
commit
e97326845c
2 changed files with 7 additions and 2 deletions
|
@ -101,7 +101,12 @@ if [[ ":${PATH}:" != *:"${RBENV_ROOT}/shims":* ]]; then
|
|||
fi
|
||||
|
||||
completion="${root}/completions/rbenv.${shell}"
|
||||
[ -r "$completion" ] && echo ". '$completion'"
|
||||
if [ -r "$completion" ]; then
|
||||
case "$shell" in
|
||||
fish ) echo ". '$completion'" ;;
|
||||
* ) echo "source '$completion'" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$no_rehash" ]; then
|
||||
echo 'rbenv rehash 2>/dev/null'
|
||||
|
|
|
@ -21,7 +21,7 @@ load test_helper
|
|||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||
SHELL=/bin/bash run rbenv-init -
|
||||
assert_success
|
||||
assert_line ". '${root}/libexec/../completions/rbenv.bash'"
|
||||
assert_line "source '${root}/libexec/../completions/rbenv.bash'"
|
||||
}
|
||||
|
||||
@test "setup shell completions (fish)" {
|
||||
|
|
Loading…
Reference in a new issue