diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/environment.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/util/module_cmd.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 073f60334e..075d7e88ea 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -989,7 +989,7 @@ def environment_after_sourcing_files(*files, **kwargs): python_cmd = python_cmd.name if python_cmd else sys.executable dump_cmd = 'import os, json; print(json.dumps(dict(os.environ)))' - dump_environment = python_cmd + ' -c "{0}"'.format(dump_cmd) + dump_environment = python_cmd + ' -E -c "{0}"'.format(dump_cmd) # Try to source the file source_file_arguments = ' '.join([ diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index d8c3ec8d14..b3c3db9b93 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -47,7 +47,7 @@ def module(*args): module_cmd += 'LD_LIBRARY_PATH="$SPACK_LD_LIBRARY_PATH" ' # Execute the python command - module_cmd += '%s -c "%s";' % (sys.executable, py_cmd) + module_cmd += '%s -E -c "%s";' % (sys.executable, py_cmd) # If LD_LIBRARY_PATH was set after `module`, dump the old value because # we have since corrupted it to ensure python would run. |