modulecmd: use of unset variable fixed in find_modulefile()

This commit is contained in:
2026-01-29 16:55:54 +01:00
parent 98be15ae18
commit c6ea07e6ad
2 changed files with 4 additions and 2 deletions
+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%/*}"