set/unset CONDA_PREFIX on activate

This commit is contained in:
Andrew Christianson
2019-03-05 11:22:13 -08:00
parent 294f64f76b
commit a54be0cab2
2 changed files with 3 additions and 1 deletions

View File

@@ -187,9 +187,11 @@ if [ -d "${prefix}/conda-meta" ] ||
case "${shell}" in
fish )
echo "set -gx CONDA_DEFAULT_ENV \"${CONDA_DEFAULT_ENV}\";"
echo "set -gx CONDA_PREFIX \"${prefix}\";"
;;
* )
echo "export CONDA_DEFAULT_ENV=\"${CONDA_DEFAULT_ENV}\";"
echo "export CONDA_PREFIX=\"${prefix}\";"
;;
esac
fi

View File

@@ -64,7 +64,7 @@ if [ -d "${prefix}/conda-meta" ] ||
shopt -s nullglob
case "${shell}" in
fish )
: # conda doesn't support fish
echo "set -e CONDA_PREFIX"
;;
* )
for script in "${prefix}/etc/conda/deactivate.d"/*.sh; do