Skip to content

Commit

Permalink
Conda doesn't export functions to subshells
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Clayton McCray authored and wwmayer committed Sep 27, 2020
1 parent 53e2d35 commit 1ef3184
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build_unix_dev_conda.sh
Expand Up @@ -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
Expand Down

0 comments on commit 1ef3184

Please sign in to comment.