Skip to content

Commit

Permalink
Avoid using subshell for Conda env activation in pip packaging test
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Jul 24, 2020
1 parent aa54dcf commit 71193f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/run-pip-tests
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ for python in "${PYTHON_EXECS[@]}"; do
source "$CONDA_PREFIX/etc/profile.d/conda.sh"
fi
conda create -y -p "$VIRTUALENV_PATH" python=$python numpy pandas pip setuptools
source activate "$VIRTUALENV_PATH" || (echo "Falling back to 'conda activate'" && conda activate "$VIRTUALENV_PATH")
source activate "$VIRTUALENV_PATH" || conda activate "$VIRTUALENV_PATH"
else
mkdir -p "$VIRTUALENV_PATH"
virtualenv --python=$python "$VIRTUALENV_PATH"
Expand Down Expand Up @@ -128,7 +128,7 @@ for python in "${PYTHON_EXECS[@]}"; do

# conda / virtualenv environments need to be deactivated differently
if [ -n "$USE_CONDA" ]; then
source deactivate || (echo "Falling back to 'conda deactivate'" && conda deactivate)
source deactivate || conda deactivate
else
deactivate
fi
Expand Down

0 comments on commit 71193f1

Please sign in to comment.