mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-23 08:17:56 +02:00
Merge branch '214-loading-a-modulefile-is-broken-if-the-path-is-relative' into 'master'
Resolve "loading a modulefile is broken if the path is relative" Closes #214 See merge request Pmodules/src!191
This commit is contained in:
@@ -695,14 +695,20 @@ subcommand_load() {
|
||||
local moduledir=''
|
||||
find_modulefile current_modulefile rel_stage moduledir "${m}" "${modulepath[@]}"
|
||||
if [[ -z ${current_modulefile} ]]; then
|
||||
local hints=''
|
||||
get_load_hints hints
|
||||
if [[ -z "${hints}" ]]; then
|
||||
die_module_nexist "${m}"
|
||||
local fname=$(std::get_abspath "${m}")
|
||||
if [[ -r "${fname}" ]]; then
|
||||
current_modulefile="${fname}"
|
||||
rel_stage='stable'
|
||||
else
|
||||
die_module_unavail "${m}${hints}"
|
||||
fi
|
||||
fi
|
||||
local hints=''
|
||||
get_load_hints hints
|
||||
if [[ -z "${hints}" ]]; then
|
||||
die_module_nexist "${m}"
|
||||
else
|
||||
die_module_unavail "${m}${hints}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
[[ ${m} == Pmodules/* ]] && [[ -n ${LOADEDMODULES} ]] && \
|
||||
die_conflict "${m}"
|
||||
# continue if already loaded
|
||||
|
||||
Reference in New Issue
Block a user