Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure /opt/conda/bin is at the end of the path #86

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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