From ad164276a61a50d7acec45228362de0aafff84c1 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 28 May 2025 16:26:03 +0200 Subject: [PATCH] modulecmd: unbound variables fixed in get_available_modules() --- Pmodules/modulecmd.bash.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 37ff29a..eec972f 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -783,6 +783,7 @@ subcommand_load() { output+="module use ${relstage}; " fi local group=${line[2]} + #echo "group=${group}" 1>&2 [[ "${group}" != 'none' ]] || continue if [[ ! ":${UsedGroups}:" == *:${group}:* ]] && \ (( ${GroupDepths[${group}]} == 0 )); then @@ -1279,7 +1280,7 @@ get_available_modules() { long_module_name="${toks[-2]}/${toks[-1]}" fi [[ -n ${OverlayExcludes} \ - && "${mod}" =~ ${OverlayExcludes} ]] && continue + && "${long_module_name}" =~ ${OverlayExcludes} ]] && continue local add='no' if [[ -n "${ol_name}" && "${ol_name,,}" != 'none' ]]; then # module is in an overlay