Merge branch 'cherry-pick-59c116b7' into '1.1.22'

Merge branch '332-modulecmd-use-of-unset-variable-in-sub-cmd-unuse' into 'master'

See merge request Pmodules/src!320
This commit is contained in:
2024-08-23 13:31:41 +02:00
+9 -7
View File
@@ -1993,13 +1993,15 @@ subcommand_unuse() {
"${arg}"
fi
local var="PMODULES_LOADED_${arg^^}"
if [[ -n "${!var}" ]]; then
std::die 3 "%s %s: %s -- %s" \
"${CMD}" "${SubCommand}" \
"cannot remove group due to loaded modules" \
"${arg}"
fi
if [[ -v PMODULES_LOADED_${arg^^} ]]; then
local var="PMODULES_LOADED_${arg^^}"
if [[ -n "${!var}" ]]; then
std::die 3 "%s %s: %s -- %s" \
"${CMD}" "${SubCommand}" \
"cannot remove group due to loaded modules" \
"${arg}"
fi
fi
std::remove_path UsedGroups "${arg}"
local overlay
for overlay in "${UsedOverlays[@]}"; do