mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
modulecmd: restore some env.vars after loading Pmodules module
This commit is contained in:
@@ -2270,7 +2270,16 @@ fi
|
||||
if [[ -n ${PMODULES_ENV} ]]; then
|
||||
eval "$("${base64}" -d <<< "${PMODULES_ENV}" 2>/dev/null)"
|
||||
if [[ -z ${Version} ]] || [[ ${Version} != ${PMODULES_VERSION} ]]; then
|
||||
# the Pmodules version changed!
|
||||
# we save _LMFILES_ and LOADEDMODULES and restore them
|
||||
# later. Otherwise the Pmodules module would not be listed
|
||||
# by module list
|
||||
declare saved_LMFILES_="${_LMFILES_}"
|
||||
declare saved_LOADEDMODULES="${LOADEDMODULES}"
|
||||
pmodules_init
|
||||
_LMFILES_="${saved_LMFILES_}"
|
||||
LOADEDMODULES="${saved_LOADEDMODULES}"
|
||||
export_env _LMFILES_ LOADEDMODULES
|
||||
fi
|
||||
else
|
||||
pmodules_init
|
||||
|
||||
Reference in New Issue
Block a user