mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-30 19:29:38 +02:00
Pmodules/modulecmd.bash.in
- bugfix in subcommand_load(): modules may write something to stderr while loading.
This commit is contained in:
@@ -824,10 +824,10 @@ subcommand_load() {
|
||||
local output=$("${modulecmd}" "${shell}" ${opts} load "${current_modulefile}" 2> "${tmpfile}")
|
||||
echo "${output}"
|
||||
eval "${output}"
|
||||
error=$( < "${tmpfile}")
|
||||
if [[ -n "${error}" ]]; then
|
||||
echo "${error}" 1>&2
|
||||
std::die 4 "${CMD} load: failed -- ${m}"
|
||||
local error=$( < "${tmpfile}")
|
||||
echo "${error}" 1>&2
|
||||
if [[ "${error}" =~ ":ERROR:" ]]; then
|
||||
std::info "${CMD} load: failed -- ${m}"
|
||||
fi
|
||||
if [[ ${verbosity_lvl} != silent ]] && [[ ${release} != stable ]]; then
|
||||
std::info "Warning: the ${release} module '${m}' has been loaded."
|
||||
|
||||
Reference in New Issue
Block a user