Skip to content

Commit

Permalink
Fix mambaforge shell history (rapidsai#219)
Browse files Browse the repository at this point in the history
* disable history when restoring shell options

* Update devcontainer-feature.json
  • Loading branch information
trxcllnt committed Feb 6, 2024
1 parent 9dc4b4d commit e3f9520
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions features/src/mambaforge/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ for default_conda_env_name in ${DEFAULT_CONDA_ENV:-} ${CONDA_DEFAULT_ENV:-} base
break;
fi
# Temporarily allow unbound variables for conda activation.
oldstate="$(shopt -po; shopt -p)"; [[ -o errexit ]] && oldstate="${oldstate}; set -e"; set +u;
oldstate="$(shopt -po | grep -E '(nounset|verbose|xtrace)')"; set +u;
if conda activate "${default_conda_env_name}" 2>/dev/null; then
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
{ set +vxo history; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
break;
else
{ set +vx; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
{ set +vxo history; } 2>/dev/null; eval "${oldstate}"; unset oldstate;
continue;
fi
done
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.4.1",
"version": "24.4.2",
"description": "A feature to install mambaforge",
"options": {
"version": {
Expand Down

0 comments on commit e3f9520

Please sign in to comment.