From dfca6fc2c93ac93a70441f37bdd35d033fd7ae35 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 18 Jan 2022 17:51:33 +0100 Subject: [PATCH] modulecmd: bugfix in find_module() The result of the find command was stored as string not as bash array. --- Pmodules/modulecmd.bash.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 7ff8383..cd30e73 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -981,9 +981,9 @@ find_module() { # a version number has been specified. But we still might # have the same module/version with different use flags. # The different release stages we ignore in this case. - modules=$(${find} -L "${dir}" -type f -not -name ".*" \ + modules=( $(${find} -L "${dir}" -type f -not -name ".*" \ -ipath "${dir}/${module}*" \ - | cut -b${col}-) + | cut -b${col}-) ) for mod in "${modules[@]}"; do # # loop over all used flags. If a module with