Skip to content

Commit 2d0b800

Browse files
committed
Use PREPARE_CONDA_ENVIRONMENT to fully skip conda
1 parent 14dceef commit 2d0b800

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/activateCondaEnvironment.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ echo "activateCondaEnvironment: CONDA_PREFIX=${CONDA_PREFIX}"
3737
echo "activateCondaEnvironment: Current conda environment=${CONDA_DEFAULT_ENV}"
3838
echo "activateCondaEnvironment: Target conda environment=${CODEGRAPH_CONDA_ENVIRONMENT}"
3939

40-
PREPARE_CONDA_ENVIRONMENT=${PREPARE_CONDA_ENVIRONMENT:-"true"} # Wether to prepare then Conda environment if needed (default, "true") or use an already prepared Conda environment ("false")
40+
PREPARE_CONDA_ENVIRONMENT=${PREPARE_CONDA_ENVIRONMENT:-"true"} # Wether to prepare a Python environment with Conda if needed (default, "true") or use an already prepared Conda environment ("false")
4141

42-
if [ "${CONDA_DEFAULT_ENV}" = "${CODEGRAPH_CONDA_ENVIRONMENT}" ] && [ "${PREPARE_CONDA_ENVIRONMENT}" = "false" ]; then
43-
echo "activateCondaEnvironment: Skipping activation. Target conda environment ${CODEGRAPH_CONDA_ENVIRONMENT} is already activated."
42+
if [ "${PREPARE_CONDA_ENVIRONMENT}" = "false" ]; then
43+
echo "activateCondaEnvironment: Skipping activation. ${PREPARE_CONDA_ENVIRONMENT} is set to false."
4444
# "return" needs to be used here instead of "exit".
4545
# This script is included in another script by using "source".
4646
# "exit" would end the main script, "return" just ends this sub script.

0 commit comments

Comments
 (0)