From 28f787cf8316cdd1073feff0d0a7bd368e3999c5 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 16 Oct 2018 14:38:58 +0200 Subject: [PATCH] Pmodules/modulecmd.bash.in - bugfix in subcommand_load(): modules may write something to stderr while loading. --- Pmodules/modulecmd.bash.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 75cd700..7cbbfa8 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.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."