Commit 1e94e893 authored by Scott Graham's avatar Scott Graham Committed by Commit Bot

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/617502Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
parent c54fa812
......@@ -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
shell=True, stdin=nul, stdout=nul, stderr=nul, env=child_env) == 0
def LooksLikeGoogler():
......
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