Setup CONDA_DEFAULT_ENV only if conda executable exists

This commit is contained in:
Yamashita, Yuu
2015-11-05 01:49:04 +00:00
parent 64ceee5c8e
commit c6a705b1d9
5 changed files with 29 additions and 40 deletions

View File

@@ -81,14 +81,16 @@ esac
# anaconda/miniconda
case "${shell}" in
fish )
echo "set -e CONDA_DEFAULT_ENV;"
;;
* )
echo "unset CONDA_DEFAULT_ENV;"
;;
esac
if [ -n "${CONDA_DEFAULT_ENV}" ]; then
case "${shell}" in
fish )
echo "set -e CONDA_DEFAULT_ENV;"
;;
* )
echo "unset CONDA_DEFAULT_ENV;"
;;
esac
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME}" ]; then
case "${shell}" in