mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-30 03:09:40 +02:00
modulecmd: PMODULES_ENV initialisation fixed
PMODULES_ENV must be initialised before modulecmd.bin is called
This commit is contained in:
@@ -131,12 +131,12 @@ save_env() {
|
||||
vars+=( OverlayDict Dir2OverlayMap)
|
||||
|
||||
local s=$(typeset -p ${vars[@]})
|
||||
declare -g PMODULES_ENV=$( encode_base64 "$s" )
|
||||
export_env 'PMODULES_ENV'
|
||||
declare -gx PMODULES_ENV=$( encode_base64 "$s" )
|
||||
}
|
||||
|
||||
_exit() {
|
||||
save_env "${g_env_must_be_saved}"
|
||||
export_env 'PMODULES_ENV'
|
||||
if [[ -n "${tmpfile}" ]] && [[ -e "${tmpfile}" ]]; then
|
||||
${rm} -f "${tmpfile}" || :
|
||||
fi
|
||||
@@ -1852,6 +1852,7 @@ pmodules_init() {
|
||||
init_overlay_vars
|
||||
init_modulepath
|
||||
init_manpath
|
||||
save_env
|
||||
export_env \
|
||||
LOADEDMODULES \
|
||||
_LMFILES_ \
|
||||
|
||||
Reference in New Issue
Block a user