summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSajid Ali <30510036+s-sajid-ali@users.noreply.github.com>2019-12-21 02:02:28 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2019-12-23 23:16:30 -0800
commit37eac1a2269fcaf1bd0e1fa51851150874676e1a (patch)
treed217dc05c1bbd03243f01f1ae41c490ca6ec5d94
parent639156130b54a05b22b5e6338431b378ff8b5030 (diff)
downloadspack-37eac1a2269fcaf1bd0e1fa51851150874676e1a.tar.gz
spack-37eac1a2269fcaf1bd0e1fa51851150874676e1a.tar.bz2
spack-37eac1a2269fcaf1bd0e1fa51851150874676e1a.tar.xz
spack-37eac1a2269fcaf1bd0e1fa51851150874676e1a.zip
use `sys.executable` instead of `python` in `_source_single_file` (#14252)
-rw-r--r--lib/spack/spack/util/environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index b85ec963e2..f7dc728e7c 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -919,7 +919,7 @@ def environment_after_sourcing_files(*files, **kwargs):
source_file = ' '.join(source_file)
dump_cmd = 'import os, json; print(json.dumps(dict(os.environ)))'
- dump_environment = 'python -c "{0}"'.format(dump_cmd)
+ dump_environment = sys.executable + ' -c "{0}"'.format(dump_cmd)
# Try to source the file
source_file_arguments = ' '.join([