modulecmd: initialise Dir2OverlayMap for all available groups

till now Dir2OverlayMap was only initialise for used groups. This is
not sufficient, if a module outside the used groups is loaded via
module load group:name.
This commit is contained in:
2022-06-09 14:41:22 +02:00
parent 38b265af02
commit 047e7161b5
2 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -62,9 +62,10 @@ scan_groups () {
local ol
for ol in "$@"; do
local mod_root="${OverlayInfo[${ol}:mod_root]}"
local moduledir
for moduledir in ${mod_root}/*/${PMODULES_MODULEFILES_DIR}; do
compute_group_depth "${moduledir}"
local dir
for dir in ${mod_root}/*/${PMODULES_MODULEFILES_DIR}; do
compute_group_depth "${dir}"
Dir2OverlayMap[${dir}]="${ol}"
done
done
}