Commit 69f5d986 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Clang build.py, set shell=True in GetCommitDescription

Otherwise Python doesn't find git when it's available as git.bat:

>where git
c:\src\depot_tools\git.bat

>python tools\clang\scripts\build.py --llvm-force-head-revision
[...]
Traceback (most recent call last):
  File "tools\clang\scripts\build.py", line 1098, in <module>
    sys.exit(main())
  File "tools\clang\scripts\build.py", line 498, in main
    CLANG_REVISION = GetCommitDescription(checkout_revision)
  File "tools\clang\scripts\build.py", line 180, in GetCommitDescription
    ['git', 'describe', '--long', '--abbrev=8', commit]).rstrip()
  File "c:\src\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\lib\subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "c:\src\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\lib\subprocess.py", line 394, in __init__
    errread, errwrite)
  File "c:\src\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\lib\subprocess.py", line 644, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Bug: 1015315
Change-Id: I403a0cb4006f274e4a438e6d69fbbb5540b97570
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438056
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarReid Kleckner <rnk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811752}
parent d73bde35
...@@ -175,8 +175,9 @@ def GetCommitDescription(commit): ...@@ -175,8 +175,9 @@ def GetCommitDescription(commit):
"""Get the output of `git describe`. """Get the output of `git describe`.
Needs to be called from inside the git repository dir.""" Needs to be called from inside the git repository dir."""
print(commit)
return subprocess.check_output( return subprocess.check_output(
['git', 'describe', '--long', '--abbrev=8', commit]).rstrip() ['git', 'describe', '--long', '--abbrev=8', commit], shell=True).rstrip()
def DeleteChromeToolsShim(): def DeleteChromeToolsShim():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment