From 1c39e8ded0627b5b27bef49466548efb36de8d5d Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 9 Jun 2022 14:46:27 +0200 Subject: [PATCH] modulecmd: bugfix in initialising src_prefix in sub-cmd search --- Pmodules/modulecmd.bash.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index bc2a2b5..20359ff 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2416,7 +2416,10 @@ subcommand_search() { shift done if [[ -z "${src_prefix}" ]]; then - local -a src_prefix=( "${UsedOverlays[@]}" ) + local ol='' + for ol in "${UsedOverlays[@]}"; do + src_prefix+=( "${OverlayInfo[${ol}:mod_root]}" ) + done fi if [[ "${opt_use_rel_stages}" == ":" ]]; then