Skip to content

Commit

Permalink
ensure /opt/conda/bin is at the end of the path (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt authored Jun 28, 2023
1 parent 397a978 commit ebc9ad4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions features/src/mambaforge/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ for default_conda_env_name in ${DEFAULT_CONDA_ENV:-} ${CONDA_DEFAULT_ENV:-} base
done;

if [ -n "${CONDA_EXE:-}" ]; then
conda_bin_paths="/opt/conda/bin";
conda_bin_paths="${conda_bin_paths} $(dirname "$(dirname "${CONDA_EXE}")")/condabin";
conda_bin_paths="${conda_bin_paths} ${CONDA_PREFIX:-/opt/conda}/bin";
conda_bin_paths="$(dirname "$(dirname "${CONDA_EXE}")")/condabin";
if test -n "${CONDA_PREFIX:-}"; then
conda_bin_paths="${conda_bin_paths} ${CONDA_PREFIX}/bin";
fi
for conda_bin_path in ${conda_bin_paths}; do
if [ -n "${PATH##*"$conda_bin_path"*}" ]; then
export PATH="$conda_bin_path:$PATH";
fi
done
if [ -n "${PATH##*"/opt/conda/bin"*}" ]; then
export PATH="$PATH:/opt/conda/bin";
fi
unset conda_bin_paths;
fi

0 comments on commit ebc9ad4

Please sign in to comment.