mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
win_toolchain: avoid dialog from GCM post git 2.14 on Windows
Git Credential Manager for Windows (as of git 2.14.1) really wants to pop up a modal dialog. Setting this environment variable avoids this so that the check for src-internal access can quietly fail. Ref: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/482 Bug: 755694 Change-Id: I38aec008662fa0a6bccb0a6220d376063ee790e7 Reviewed-on: https://chromium-review.googlesource.com/617502 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
@@ -214,10 +214,14 @@ def SaveTimestampsAndHash(root, sha1):
|
||||
def HaveSrcInternalAccess():
|
||||
"""Checks whether access to src-internal is available."""
|
||||
with open(os.devnull, 'w') as nul:
|
||||
# This is required to avoid modal dialog boxes after Git 2.14.1 and Git
|
||||
# Credential Manager for Windows 1.12. See https://crbug.com/755694 and
|
||||
# https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/482.
|
||||
child_env = dict(os.environ, GCM_INTERACTIVE='NEVER')
|
||||
return subprocess.call(
|
||||
['git', '-c', 'core.askpass=true', 'remote', 'show',
|
||||
'https://chrome-internal.googlesource.com/chrome/src-internal/'],
|
||||
shell=True, stdin=nul, stdout=nul, stderr=nul) == 0
|
||||
['git', '-c', 'core.askpass=true', 'remote', 'show',
|
||||
'https://chrome-internal.googlesource.com/chrome/src-internal/'],
|
||||
shell=True, stdin=nul, stdout=nul, stderr=nul, env=child_env) == 0
|
||||
|
||||
|
||||
def LooksLikeGoogler():
|
||||
|
||||
Reference in New Issue
Block a user