Conda doesn't export functions to subshells

build_unix_dev_conda.sh fails to activate the freecad_dev
environment. This is issue #7980 on the conda github. This has
one of the suggested work arounds added.
This commit is contained in:
Clayton McCray
2020-09-26 18:06:00 -05:00
committed by wwmayer
parent 53e2d35ee9
commit 1ef31842c9

View File

@@ -52,10 +52,12 @@ if [[ "${CONDA_DEFAULT_ENV}" =~ "${FCENV}" ]]; then
echo "Already in env"
elif [[ -z "${CONDA_DEFAULT_ENV}" ]]; then
echo "Not in conda env... activating"
eval "$(conda shell.bash hook)"
conda activate ${FCENV}
else
# Assume we are in some other env.
echo "In ${CONDA_DEFAULT_ENV}, attempting switch to ${FCENV}"
eval "$(conda shell.bash hook)"
conda deactivate
conda activate ${FCENV}
fi