Skip to content

Commit

Permalink
Don't rely on the subshell
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Jul 16, 2020
1 parent 3dc0c22 commit 25e87b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dev/run-pip-tests
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,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
# conda activate "$VIRTUALENV_PATH" || echo "Falling back to 'source activate'
source activate "$VIRTUALENV_PATH"
conda activate "$VIRTUALENV_PATH" || echo "Falling back to 'source activate'"; source activate "$VIRTUALENV_PATH"
else
mkdir -p "$VIRTUALENV_PATH"
virtualenv --python=$python "$VIRTUALENV_PATH"
Expand Down Expand Up @@ -126,7 +125,7 @@ for python in "${PYTHON_EXECS[@]}"; do

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

0 comments on commit 25e87b5

Please sign in to comment.