Skip to content

Commit

Permalink
Use conda activate in create testenv
Browse files Browse the repository at this point in the history
  • Loading branch information
aseyboldt committed Aug 16, 2020
1 parent f3bbf07 commit f9b563d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/create_testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ command -v conda >/dev/null 2>&1 || {
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv

if [ -z ${GLOBAL} ]; then
source $CONDA_PREFIX/etc/profile.d/conda.sh
if conda env list | grep -q ${ENVNAME}; then
echo "Environment ${ENVNAME} already exists, keeping up to date"
source activate ${ENVNAME}
conda activate ${ENVNAME}
mamba env update -f environment-dev.yml
else
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install -c conda-forge mamba --yes
mamba env create -f environment-dev.yml
source activate ${ENVNAME}
conda activate ${ENVNAME}
fi
fi

Expand Down

0 comments on commit f9b563d

Please sign in to comment.