Skip to content

Commit

Permalink
separate stdout and stderr for module loading (spack#6713)
Browse files Browse the repository at this point in the history
  • Loading branch information
becker33 authored Dec 22, 2017
1 parent f2e061d commit feb4f1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/spack/spack/util/module_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))


Expand Down

0 comments on commit feb4f1b

Please sign in to comment.