Fix get_syzygy_binaries.py on cygwin
get_syzygy_binaries.py errors out on cygwin, as it sends a temporary path in Cygwin form to gsutil, though gsutil is now run through depot_tools' python. This change makes the temporary path a Windows path so gsutil can read it. Bug: Change-Id: I7bbabfb23b6925f0c8df5ba216506b7a6be0a021 Reviewed-on: https://chromium-review.googlesource.com/746202 Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: Chris Nardi <hichris123@gmail.com> Cr-Original-Commit-Position: refs/heads/master@{#514007} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5ed3d83dd03074884fc658a4b04b531ca05c619b
This commit is contained in:
Родитель
d3c8ce01f9
Коммит
834fd1a1bb
|
@ -281,8 +281,14 @@ def _Download(resource):
|
|||
"""Downloads the given GS resource to a temporary file, returning its path."""
|
||||
tmp = tempfile.mkstemp(suffix='syzygy_archive')
|
||||
os.close(tmp[0])
|
||||
tmp_file = tmp[1]
|
||||
url = 'gs://syzygy-archive' + resource
|
||||
_GsUtil('cp', url, tmp[1])
|
||||
if sys.platform == 'cygwin':
|
||||
# Change temporary path to Windows path for gsutil
|
||||
def winpath(path):
|
||||
return subprocess.check_output(['cygpath', '-w', path]).strip()
|
||||
tmp_file = winpath(tmp_file)
|
||||
_GsUtil('cp', url, tmp_file)
|
||||
return tmp[1]
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче