Skip to content

Commit 712e3fb

Browse files
committed
Use conda activate in create testenv
1 parent f3bbf07 commit 712e3fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/create_testenv.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ command -v conda >/dev/null 2>&1 || {
2222
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
2323

2424
if [ -z ${GLOBAL} ]; then
25+
source $(dirname $(dirname $(which conda)))/etc/profile.d/conda.sh
2526
if conda env list | grep -q ${ENVNAME}; then
2627
echo "Environment ${ENVNAME} already exists, keeping up to date"
27-
source activate ${ENVNAME}
28+
conda activate ${ENVNAME}
2829
mamba env update -f environment-dev.yml
2930
else
3031
conda config --add channels conda-forge
3132
conda config --set channel_priority strict
3233
conda install -c conda-forge mamba --yes
3334
mamba env create -f environment-dev.yml
34-
source activate ${ENVNAME}
35+
conda activate ${ENVNAME}
3536
fi
3637
fi
3738

0 commit comments

Comments
 (0)