Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions features/src/mambaforge/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ for default_conda_env_name in ${DEFAULT_CONDA_ENV:-} ${CONDA_DEFAULT_ENV:-} base
if grep -qF "(${default_conda_env_name})" <<< "${CONDA_PROMPT_MODIFIER:-}"; then
break;
fi
conda activate "$default_conda_env_name" 2>/dev/null && break || continue;
done;
# Temporarily allow unbound variables for conda activation.
oldstate="$(shopt -po; shopt -p)"; [[ -o errexit ]] && oldstate="${oldstate}; set -e"; set +u;
if conda activate "${default_conda_env_name}" 2>/dev/null; then
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
break;
else
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
continue;
fi
done

if [ -n "${CONDA_EXE:-}" ]; then
conda_bin_paths="$(dirname "$(dirname "${CONDA_EXE}")")/condabin";
Expand Down
2 changes: 1 addition & 1 deletion features/src/mambaforge/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Mambaforge",
"id": "mambaforge",
"version": "24.2.1",
"version": "24.2.2",
"description": "A feature to install mambaforge",
"options": {
"version": {
Expand Down