From 23c21fe22b4c29eb3896814576d43594d119be14 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 2 Feb 2021 09:13:08 +0100 Subject: [PATCH] modulecmd.bash.in: bugfix in subcommand_load() - current_modulefile must be declared at the very beginning --- 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 bf47cd2..e4929e1 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -280,6 +280,7 @@ USAGE: subcommand_load() { local -r subcommand='load' + local current_modulefile='' # # output load 'hints' @@ -492,7 +493,6 @@ subcommand_load() { UsedReleases=( "${release}" ) fi fi # handle extended module names - local current_modulefile='' local release='' find_module current_modulefile release "${MODULEPATH}" "${m}" if [[ -z ${current_modulefile} ]]; then