Commit 7f834ad2 authored by szager@chromium.org's avatar szager@chromium.org

Do not prompt for passwords

Forcing function for developers to create a .netrc file.
BUG=

Review URL: https://codereview.chromium.org/18949002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210686 0039d316-1c4b-4281-b951-d872f2087c98
parent e79161aa
......@@ -1030,6 +1030,10 @@ class GitWrapper(SCMWrapper):
kwargs['filter_fn'] = GitFilter(kwargs['nag_timer'] / 2,
kwargs.get('filter_fn'))
kwargs.setdefault('print_stdout', False)
# Don't prompt for passwords; just fail quickly and noisily.
env = kwargs.get('env') or kwargs.setdefault('env', os.environ.copy())
env.setdefault('GIT_ASKPASS', 'true')
env.setdefault('SSH_ASKPASS', 'true')
else:
kwargs.setdefault('print_stdout', True)
stdout = kwargs.get('stdout', sys.stdout)
......
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