From a86a0a7ce46aee533de28f1d00ff416b03e36cfd Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 11 Sep 2024 17:00:52 +0200 Subject: [PATCH] modulecmd: bugfix in handling overlay excludes --- Pmodules/modulecmd.bash.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 94c7c95..a345d6f 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1217,7 +1217,7 @@ get_available_modules() { # its sub-directories local mod='' # module_name/module_version while read -r mod; do - [[ "${mod}" =~ ${OverlayExcludes} ]] && continue + [[ -n ${OverlayExcludes} && "${mod}" =~ ${OverlayExcludes} ]] && continue local name="${mod%/*}" local add='no' if [[ -n "${ol}" && "${ol}" != 'none' ]]; then