summaryrefslogtreecommitdiff
path: root/lib
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-21 00:02:28 -0800
commit96063f9168e4235df41ab6738aa8c0cfec260f5f (patch)
tree91d5b409ceabf5621eb80cb7b2b8a89db23c71fa /lib
parent8522d1f0cf710ceaf99fdb15a85c6358bda8b2a6 (diff)
downloadspack-96063f9168e4235df41ab6738aa8c0cfec260f5f.tar.gz
spack-96063f9168e4235df41ab6738aa8c0cfec260f5f.tar.bz2
spack-96063f9168e4235df41ab6738aa8c0cfec260f5f.tar.xz
spack-96063f9168e4235df41ab6738aa8c0cfec260f5f.zip
use `sys.executable` instead of `python` in `_source_single_file` (#14252)
Diffstat (limited to 'lib')
-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([