mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
3c3644a78b
commit
24acf27f48
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user