Check for autoenv_init function before trying to source autoenv.

This commit is contained in:
Jonathan Cremin 2015-07-10 14:03:55 +01:00
parent 3ea3384186
commit b7617b35ff
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# Activates autoenv or reports its failure
if ! source $HOME/.autoenv/activate.sh 2>/dev/null; then
if ! type autoenv_init &>/dev/null && ! source $HOME/.autoenv/activate.sh 2>/dev/null; then
echo '-------- AUTOENV ---------'
echo 'Could not find ~/.autoenv/activate.sh.'
echo 'Could not find autoenv_init function or ~/.autoenv/activate.sh.'
echo 'Please check if autoenv is correctly installed.'
echo 'In the meantime the autoenv plugin is DISABLED.'
echo '--------------------------'