You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:49:44 UTC
[buildstream] 06/13: repo/git.py: Remove PWD from test Git
environment
This is an automated email from the ASF dual-hosted git repository.
root pushed a commit to branch tmewett/merge-git-tag
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit cb96eb82df412e348539b514edc6e84af053f648
Author: Tom Mewett <to...@codethink.co.uk>
AuthorDate: Thu Jan 9 14:05:08 2020 +0000
repo/git.py: Remove PWD from test Git environment
It is not used by Git or any of the tests.
---
tests/testutils/repo/git.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py
index 779eb76..14eb6f4 100644
--- a/tests/testutils/repo/git.py
+++ b/tests/testutils/repo/git.py
@@ -23,8 +23,7 @@ class Git(Repo):
def _run_git(self, *args, **kwargs):
argv = [GIT]
argv.extend(args)
- if "env" not in kwargs:
- kwargs["env"] = dict(self.env, PWD=self.repo)
+ kwargs.setdefault("env", self.env)
kwargs.setdefault("cwd", self.repo)
kwargs.setdefault("check", True)
return subprocess.run(argv, **kwargs) # pylint: disable=subprocess-run-check