aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pkgcore/pytest/plugin.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkgcore/pytest/plugin.py b/src/pkgcore/pytest/plugin.py
index 0579a45ad..d7231dd3c 100644
--- a/src/pkgcore/pytest/plugin.py
+++ b/src/pkgcore/pytest/plugin.py
@@ -41,6 +41,8 @@ class GitRepo:
self.add(pjoin(self.path, ".init"), create=True)
def run(self, cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, **kwargs):
+ env = os.environ.copy()
+ env["HOME"] = self.path
return subprocess.run(
cmd,
cwd=self.path,
@@ -48,6 +50,7 @@ class GitRepo:
check=True,
stdout=stdout,
stderr=stderr,
+ env=env,
**kwargs,
)