Commit b542cca2 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

git_test_utils: Copy os.environ in get_git_commit_env()

Instead of creating an empty dict and setting all the required git variables
there, add those variables to os.environ so that we do not drop other
required variables -- in my case, git was not in /usr/bin so invoking 'git
commit' in _add_schema_commit fails with "no such file or directory".

Change-Id: I8c9b14e1f534efc8f40d21b312a5396b2f65f4a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1528290
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
parent efe902b2
......@@ -355,7 +355,7 @@ class GitRepo(object):
def get_git_commit_env(self, commit_data=None):
commit_data = commit_data or {}
env = {}
env = os.environ.copy()
for prefix in ('AUTHOR', 'COMMITTER'):
for suffix in ('NAME', 'EMAIL', 'DATE'):
singleton = '%s_%s' % (prefix, suffix)
......
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