Merge pull request #1359 from Pmodules/1358-modulecmd-unset-variable-used-in-find_modulefile

modulecmd: use of unset variable fixed in find_modulefile()
This commit is contained in:
2026-01-29 16:57:00 +01:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -3,6 +3,8 @@
## Version 2.0.4
### modulecmd
* Use of unset variable fixed in find_modulefile().
(#1358)
* When loading multiple modules, `LD_LIBRARY_PATH` may not have
been set correctly.
(#1354)
+2 -2
View File
@@ -1406,14 +1406,14 @@ find_modulefile(){
local -a modulepath=()
IFS=':' read -r -a modulepath <<<"${MODULEPATH}"
if [[ "${m:0:1}" = '/' || -r "${m}" ]]; then
if [[ "${modulename:0:1}" = '/' || -r "${modulename}" ]]; then
# handle absolut or relative module names
local -- absname=$(std::get_abspath "${m}")
local -- ol_name=''
local -- group=''
find_overlay ol_name group "${absname}"
[[ "${ol_name}" != 'none' ]] && \
die_ol_absname_not_allowed "${m}"
die_ol_absname_not_allowed "${modulename}"
ref_modulefile="${absname}"
ref_relstage='stable'
ref_moduledir="${absname%/*}"