Skip to content

Commit 905bbce

Browse files
author
Christoph Paulik
committed
Set CONDA_PREFIX to make is useable in conda activate/deactivate scripts.
1 parent e4d2c36 commit 905bbce

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bin/pyenv-sh-activate

+2
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ if [ -x "${prefix}/bin/conda" ]; then
240240
: # conda doesn't support fish
241241
;;
242242
* )
243+
CONDA_PREFIX="$prefix"
244+
echo "export CONDA_PREFIX=\"${CONDA_PREFIX}\";"
243245
for script in "${prefix}/etc/conda/activate.d"/*.sh; do
244246
echo ". \"${script}\";"
245247
done

bin/pyenv-sh-deactivate

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ if [ -x "${prefix}/bin/conda" ]; then
6969
for script in "${prefix}/etc/conda/deactivate.d"/*.sh; do
7070
echo ". \"${script}\";"
7171
done
72+
echo "unset CONDA_PREFIX"
7273
;;
7374
esac
7475
shopt -u nullglob

0 commit comments

Comments
 (0)