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 8522d1f0cf
commit 96063f9168

View File

@ -919,7 +919,7 @@ def _source_single_file(file_and_args, environment):
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([