mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
modulecmd: bugfix if MODULEPATH starts or ends with a colon
This commit is contained in:
@@ -715,6 +715,9 @@ subcommand_load() {
|
||||
LOADEDMODULES="${_LMFILES_}"
|
||||
local dir
|
||||
while read dir; do
|
||||
# if the first or last character of MODULEPATH is ':',
|
||||
# we read an empty string.
|
||||
[[ -z ${dir} ]] && continue
|
||||
[[ "${dir: -1}" == "/" ]] || dir+="/"
|
||||
LOADEDMODULES="${LOADEDMODULES//${dir}}"
|
||||
map_moduledir2ol_name overlay "${dir}"
|
||||
|
||||
Reference in New Issue
Block a user