From feb4f1b3876790c7455bb5899b48f88543a3c40f Mon Sep 17 00:00:00 2001 From: becker33 Date: Thu, 21 Dec 2017 16:27:52 -0800 Subject: separate stdout and stderr for module loading (#6713) --- lib/spack/spack/util/module_cmd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index 00fc4ddc65..e5dc0f84a6 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -133,7 +133,10 @@ def load_module(mod): exec(compile(modulecmd('unload', text[i + 1], output=str, error=str), '', 'exec')) # Load the module now that there are no conflicts - load = modulecmd('load', mod, output=str, error=str) + # Some module systems use stdout and some use stderr + load = modulecmd('load', mod, output=str, error='/dev/null') + if not load: + load = modulecmd('load', mod, error=str) exec(compile(load, '', 'exec')) -- cgit v1.2.3-60-g2f50