mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:35:05 +00:00
[infra] Fix vs_toolchain.py
Pass shell=True when invoking python, without this flag Windows own python.exe is selected even though it is shadowed in the PATH by depot_tools' python.bat. Change-Id: Ia581853ff5819f97f872761ff7557ba9d6028beb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200875 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
parent
d9f03e9580
commit
f364c8bf7b
|
@ -527,6 +527,9 @@ def Update(force=False, no_download=False):
|
|||
|
||||
get_toolchain_args = [
|
||||
# TODO(athom): use sys.executable (python3).
|
||||
# Note: depot_tools contains python.bat not python.exe
|
||||
# so for python to land on the first python in the PATH
|
||||
# irrespective of its extension we pass shell=True below.
|
||||
'python',
|
||||
os.path.join(depot_tools_path, 'win_toolchain',
|
||||
'get_toolchain_if_necessary.py'),
|
||||
|
@ -537,7 +540,7 @@ def Update(force=False, no_download=False):
|
|||
get_toolchain_args.append('--force')
|
||||
if no_download:
|
||||
get_toolchain_args.append('--no-download')
|
||||
subprocess.check_call(get_toolchain_args)
|
||||
subprocess.check_call(get_toolchain_args, shell=True)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue