mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-08 14:50:49 +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=''
|
local moduledir=''
|
||||||
find_modulefile current_modulefile rel_stage moduledir "${m}" "${modulepath[@]}"
|
find_modulefile current_modulefile rel_stage moduledir "${m}" "${modulepath[@]}"
|
||||||
if [[ -z ${current_modulefile} ]]; then
|
if [[ -z ${current_modulefile} ]]; then
|
||||||
local hints=''
|
local fname=$(std::get_abspath "${m}")
|
||||||
get_load_hints hints
|
if [[ -r "${fname}" ]]; then
|
||||||
if [[ -z "${hints}" ]]; then
|
current_modulefile="${fname}"
|
||||||
die_module_nexist "${m}"
|
rel_stage='stable'
|
||||||
else
|
else
|
||||||
die_module_unavail "${m}${hints}"
|
local hints=''
|
||||||
fi
|
get_load_hints hints
|
||||||
fi
|
if [[ -z "${hints}" ]]; then
|
||||||
|
die_module_nexist "${m}"
|
||||||
|
else
|
||||||
|
die_module_unavail "${m}${hints}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
[[ ${m} == Pmodules/* ]] && [[ -n ${LOADEDMODULES} ]] && \
|
[[ ${m} == Pmodules/* ]] && [[ -n ${LOADEDMODULES} ]] && \
|
||||||
die_conflict "${m}"
|
die_conflict "${m}"
|
||||||
# continue if already loaded
|
# continue if already loaded
|
||||||
|
|||||||
Reference in New Issue
Block a user