mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-24 00:27:59 +02:00
modulecmd: unset 'Version' before restoring variables from cache
If 'Version' is set in the calling shell, initialisation might be skipped.
This commit is contained in:
@@ -2882,6 +2882,8 @@ if [[ -z "${Subcommands[${subcommand}]}" ]]; then
|
||||
std::die 1 "${CMD}: unknown sub-command -- ${subcommand}"
|
||||
fi
|
||||
|
||||
# restore variables from last call
|
||||
unset Version
|
||||
if [[ -n ${PMODULES_ENV} ]]; then
|
||||
eval "$("${base64}" -d <<< "${PMODULES_ENV}" 2>/dev/null)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user