modulecmd.bash.in: bugfix in subcommand_load()

- current_modulefile must be declared at the very beginning
This commit is contained in:
Achim Gsell
2021-02-02 09:13:08 +01:00
parent 2f2da9e8f1
commit 23c21fe22b
+1 -1
View File
@@ -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