BUGFIX: modulecmd: unbound variable fixed in get_load_hints()

This commit is contained in:
2026-03-16 15:59:44 +01:00
parent 5f3b98ef54
commit d23d9cc571
2 changed files with 17 additions and 2 deletions
+14
View File
@@ -12,9 +12,23 @@
## Version 2.0.5
### modulecmd
* Bugfix: Under some conditions it could happen, that the variable
GroupDepths($group) was undefined in the function get\_load\_hints().
The PR for issue #1368 didn't fix the bug.
(#1384)
* Bugfixes: cherry-pick fixes for issues #1368 and #1371
(#1375)
### build-system
* Enhancemnet: It is now possible to specify a sub-directory relative to
$SRC_DIR used by cmake/autotools in the YAML config file.
(#1382)
* Bugfix: remove comments while reading YAML config files
(#1380)
* Bugfix: test whether a variant has to be build or not fixed
(#1377)
## Version 2.0.4
### modulecmd
+3 -2
View File
@@ -799,7 +799,8 @@ subcommand_load() {
local -n output="$1" # [out] ref.var to return result
output=''
local -- search_result="$(set +x; subcommand_search "${m}" -a --no-header 2>&1)"
local -- search_result=''
find_matching_modules search_result -a "${m}"
local -- relstage=''
while read -r -a line; do
(( ${#line[@]} == 0 )) && continue
@@ -816,7 +817,7 @@ subcommand_load() {
output+="module use ${group}; "
fi
local -i n=$(( ${GroupDepths[${group}]}/2 ))
output+="module load ${line[*]:4:$n} ${line[0]}\n"
output+="module load ${line[*]:5:$n} ${line[0]}\n"
done <<<"${search_result}"
if [[ -n ${output} ]]; then