Skip to content

Commit 6cd677c

Browse files
committed
Set up conda the 4.4+ way
That is: we source the conda.sh script in etc/profile.d now. I hope this will really fully activate conda for the running script.
1 parent 02c2b6a commit 6cd677c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

travis-build.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ then
149149
echo "= Conda setup ="
150150

151151
condaDir=$HOME/miniconda
152-
if [ ! -f "$condaDir/bin/conda" ]; then
152+
condaSh=$condaDir/etc/profile.d/conda.sh
153+
if [ ! -f "$condaSh" ]; then
153154
echo
154155
echo "== Installing conda =="
155156
if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then
@@ -164,17 +165,18 @@ then
164165

165166
echo
166167
echo "== Updating conda =="
167-
$condaDir/bin/conda config --set always_yes yes --set changeps1 no &&
168-
$condaDir/bin/conda update -q conda &&
169-
$condaDir/bin/conda info -a
168+
. "$condaSh" &&
169+
conda config --set always_yes yes --set changeps1 no &&
170+
conda update -q conda &&
171+
conda info -a
170172
checkSuccess $?
171173

172174
echo
173175
echo "== Configuring environment =="
174176
condaEnv=travis-scijava
175177
test -d "$condaDir/envs/$condaEnv" && condaAction=update || condaAction=create
176-
$condaDir/bin/conda env "$condaAction" -n "$condaEnv" -f environment.yml &&
177-
$condaDir/bin/conda activate "$condaEnv"
178+
conda env "$condaAction" -n "$condaEnv" -f environment.yml &&
179+
conda activate "$condaEnv"
178180
checkSuccess $?
179181

180182
echo travis_fold:end:scijava-conda

0 commit comments

Comments
 (0)