Skip to content

Commit 97d5db4

Browse files
authored
Merge pull request #66 from ACCESS-NRI/test-micromamba-activate-fix
Micromamba activate error fix in module insert script
2 parents 508fcce + 1282fc6 commit 97d5db4

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/condaenv.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
# Prints the environment variables set by 'conda activate $1', for processing by the modules
33
export PATH=/usr/bin:/bin
4+
export MAMBA_ROOT_PREFIX="${1}"
45
eval "$( "${1}"/bin/micromamba shell hook -s bash )"
56
micromamba activate "${2}"
67
/bin/env

scripts/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function construct_module_insert() {
134134
module_path="${9}"
135135

136136
declare -a discard_paths=( "/bin" "/usr/bin" "/condabin" )
137-
declare -a discard_vars=( "MODULEPATH" "_" "PWD" "SHLVL" )
137+
declare -a discard_vars=( "MODULEPATH" "_" "PWD" "SHLVL" "MAMBA_ROOT_PREFIX")
138138

139139
while read line; do
140140
key="${line%%=*}"

scripts/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ source functions.sh
1515
export OVERLAY_BASE="${CONDA_TEMP_PATH}"/overlay
1616
export CONDA_OUTER_BASE="${OVERLAY_BASE}"/"${CONDA_BASE#/*/}"
1717
export CONDA_INSTALLATION_PATH=${CONDA_INSTALLATION_PATH:-${CONDA_BASE}/./${APPS_SUBDIR}/${CONDA_INSTALL_BASENAME}}
18+
export MAMBA_ROOT_PREFIX="${CONDA_INSTALLATION_PATH}"
1819

1920
function inner() {
2021

0 commit comments

Comments
 (0)