diff options
author | becker33 <becker33@llnl.gov> | 2017-12-21 16:27:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-21 16:27:52 -0800 |
commit | feb4f1b3876790c7455bb5899b48f88543a3c40f (patch) | |
tree | 7baf4b49804eb2e3dcbfdac36d598e351ca08f0d | |
parent | f2e061debfe99ddfc5a4f08bb2d0ea9fae14e21d (diff) | |
download | spack-feb4f1b3876790c7455bb5899b48f88543a3c40f.tar.gz spack-feb4f1b3876790c7455bb5899b48f88543a3c40f.tar.bz2 spack-feb4f1b3876790c7455bb5899b48f88543a3c40f.tar.xz spack-feb4f1b3876790c7455bb5899b48f88543a3c40f.zip |
separate stdout and stderr for module loading (#6713)
-rw-r--r-- | lib/spack/spack/util/module_cmd.py | 5 |
1 files changed, 4 insertions, 1 deletions
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), '<string>', '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, '<string>', 'exec')) |