Procházet zdrojové kódy

check if completion script is readable

fixes #444
pull/360/head^2
Mislav Marohnić před 13 roky
rodič
revize
bdcc2e1790
2 změnil soubory, kde provedl 3 přidání a 6 odebrání
  1. +2
    -5
      libexec/rbenv-init
  2. +1
    -1
      test/init.bats

+ 2
- 5
libexec/rbenv-init Zobrazit soubor

@ -83,11 +83,8 @@ if [[ ":${PATH}:" != *:"${RBENV_ROOT}/shims":* ]]; then
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
fi
case "$shell" in
bash | zsh )
echo "source \"$root/completions/rbenv.${shell}\""
;;
esac
completion="${root}/completions/rbenv.${shell}"
[ -r "$completion" ] && echo "source '$completion'"
if [ -z "$no_rehash" ]; then
echo 'rbenv rehash 2>/dev/null'

+ 1
- 1
test/init.bats Zobrazit soubor

@ -22,7 +22,7 @@ load test_helper
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
run rbenv-init -
assert_success
assert_line 9;source "'${root}'/libexec/../completions/rbenv.bash"';
assert_line 4;source '${root}/libexec/../completions/rbenv.bash'";
}
@test "option to skip rehash" {

Načítá se…
Zrušit
Uložit