From 37eac1a2269fcaf1bd0e1fa51851150874676e1a Mon Sep 17 00:00:00 2001 From: Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> Date: Sat, 21 Dec 2019 02:02:28 -0600 Subject: use `sys.executable` instead of `python` in `_source_single_file` (#14252) --- lib/spack/spack/util/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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([ -- cgit v1.2.3-60-g2f50