From e0950bcd250d68946821041cf218a5fce1b2f004 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 11 May 2021 12:05:00 +0200 Subject: [PATCH] modulecmd: fix initialisation after loading a Pmodule module --- Pmodules/modulecmd.bash.in | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 871caf0..e449b61 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2271,15 +2271,8 @@ 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 + declare -g Version="${PMODULES_VERSION}" + g_env_must_be_saved='yes' fi else pmodules_init