diff options
author | Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> | 2020-01-02 15:30:11 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-02-07 16:35:57 -0600 |
commit | 4da8f7fceff7c9f829ed99823c288abf6b81db48 (patch) | |
tree | 2dd76499d4c55b98be5cd9f9e59d4991033c862a | |
parent | 69e5683ba49d9e3c7e5f21d8cfade2d0539097cf (diff) | |
download | spack-4da8f7fceff7c9f829ed99823c288abf6b81db48.tar.gz spack-4da8f7fceff7c9f829ed99823c288abf6b81db48.tar.bz2 spack-4da8f7fceff7c9f829ed99823c288abf6b81db48.tar.xz spack-4da8f7fceff7c9f829ed99823c288abf6b81db48.zip |
RHEL8 bugfix for module_cmd (#14349)
-rw-r--r-- | lib/spack/spack/util/module_cmd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index 4ff6b0de43..d203670769 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -9,6 +9,7 @@ parsing environment modules. """ import subprocess import os +import sys import json import re @@ -31,7 +32,7 @@ def module(*args): if args[0] in module_change_commands: # Do the module manipulation, then output the environment in JSON # and read the JSON back in the parent process to update os.environ - module_cmd += ' >/dev/null; python -c %s' % py_cmd + module_cmd += ' >/dev/null;' + sys.executable + ' -c %s' % py_cmd module_p = subprocess.Popen(module_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, |