Use git.bat from depot_tools in githooks setup on Windows (flutter/engine#33389)

The git installed by depot_tools on Windows is only available as git.bat from Python.
The shell auto-replaces git by git.bat, but that doesn't happen when running from Python.
The git installed by depot_tools may be the only git installed on Windows.

Without this fix, gclient sync does not work on Windows for me
This commit is contained in:
William Hesse 2022-05-16 17:11:52 +02:00 committed by GitHub
parent 3c3644a78b
commit 24acf27f48

View File

@ -22,11 +22,13 @@ def IsWindows():
def Main(argv):
git = 'git'
githooks = os.path.join(FLUTTER_DIR, 'tools', 'githooks')
if IsWindows():
git = 'git.bat'
githooks = os.path.join(githooks, 'windows')
result = subprocess.run([
'git',
git,
'config',
'core.hooksPath',
githooks,