forked from firka/flutter
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user