use sys.executable instead of python in _source_single_file (#14252)

This commit is contained in:
Sajid Ali 2019-12-21 02:02:28 -06:00 committed by Todd Gamblin
parent 639156130b
commit 37eac1a226
No known key found for this signature in database
GPG key ID: 66B24B9050FDD0B8

View file

@ -919,7 +919,7 @@ def _source_single_file(file_and_args, environment):
source_file = ' '.join(source_file) source_file = ' '.join(source_file)
dump_cmd = 'import os, json; print(json.dumps(dict(os.environ)))' 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 # Try to source the file
source_file_arguments = ' '.join([ source_file_arguments = ' '.join([