mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-11-05 22:23:20 +01:00
modulecmd: use of unset variable fixed
This commit is contained in:
1 parent
10c6922f8a
commit
fefe313d51
1 file changed
+9
-7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user