Fix for GitWrapper._Capture
BUG=361155
Review URL: https://codereview.chromium.org/232993003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262977 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_scm.py b/gclient_scm.py
index e2a4cd7..0de67bd 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -162,7 +162,7 @@
if os.path.exists(os.path.join(self.checkout_path, '.git')):
actual_remote_url = shlex.split(self._Capture(
['config', '--local', '--get-regexp', r'remote.*.url'],
- self.checkout_path))[1]
+ cwd=self.checkout_path))[1]
# If a cache_dir is used, obtain the actual remote URL from the cache.
if getattr(self, 'cache_dir', None):
@@ -948,7 +948,7 @@
return None
return branch
- def _Capture(self, args, cwd=None, **kwargs):
+ def _Capture(self, args, **kwargs):
kwargs.setdefault('cwd', self.checkout_path)
kwargs.setdefault('stderr', subprocess2.PIPE)
return subprocess2.check_output(['git'] + args, **kwargs).strip()