Skip to content

Commit

Permalink
scripts: When referring the base conda environment, use the correct t…
Browse files Browse the repository at this point in the history
…erm 'base', not the deprecated term 'root'
  • Loading branch information
stuarteberg committed Mar 14, 2019
1 parent 4b80b6a commit cebf887
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/get-go-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -z "${CONDA_PREFIX}" ]; then
fi

if [[ "${CONDA_PREFIX}" == "$(conda info --base)" ]]; then
1>&2 echo "The root conda environment is currently active. Please use a non-root environment."
1>&2 echo "The base conda environment is currently active. Please use a non-base environment."
exit 1
fi

Expand Down
8 changes: 4 additions & 4 deletions scripts/install-developer-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if [ -z "${CONDA_PREFIX}" ]; then
exit 1
fi

if [[ "${CONDA_PREFIX}" == "$(conda info --root)" ]]; then
1>&2 echo "The root conda environment is currently active. Please use a non-root environment."
if [[ "${CONDA_PREFIX}" == "$(conda info --base)" ]]; then
1>&2 echo "The base conda environment is currently active. Please use a non-base environment."
exit 1
fi

Expand All @@ -21,7 +21,7 @@ cd ${THIS_SCRIPT_DIR}
# The following python script requires the 'yaml' python module,
# which happens to be available in the conda base interpreter,
# so we use that interpreter to run it.
CONDA_PYTHON=$(conda info --root)/bin/python
CONDA_PYTHON=$(conda info --base)/bin/python
${CONDA_PYTHON} _install_compiled_dependencies.py

# Some of those dependencies (namely, gcc) may have installed scripts to
Expand All @@ -38,7 +38,7 @@ else
# you explicitly define it by sourcing the activate script.
# Super-annoying.
# https://github.com/conda/conda/issues/7980#issuecomment-441358406
CONDA_BASE=$(conda info --root)
CONDA_BASE=$(conda info --base)
source ${CONDA_BASE}/etc/profile.d/conda.sh
conda activate ${CONDA_DEFAULT_ENV}
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/make-release-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi

echo "Building DVID distro from latest conda packages"

DVID_DISTRO_ENV=$(conda info --root)/envs/dvid-distro
DVID_DISTRO_ENV=$(conda info --base)/envs/dvid-distro

# Cleanup from the previous distro env, if it exists.
if [ -d ${DVID_DISTRO_ENV} ]; then
Expand All @@ -33,7 +33,7 @@ cp ${THIS_SCRIPT_DIR}/distro-files/* ${DVID_DISTRO_ENV}
list_out=($(conda list -n dvid-distro dvid | grep -v '#' | head -n1))
version=${list_out[1]}

cd $(conda info --root)/envs
cd $(conda info --base)/envs

DIST_NAME=dvid-${version}-dist-${OS}
TARBALL_NAME=${DIST_NAME}.tar.bz2
Expand Down

0 comments on commit cebf887

Please sign in to comment.