mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-11-29 15:47:46 +01: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:
1 parent
50ef08ca2f
commit
ffbf6158e6
1 file changed
+2
@@ -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