Skip to content

Commit c473b6b

Browse files
Update git.py.
1 parent 0c5afe3 commit c473b6b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jupyterlab_git/git.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,9 @@ async def status(self, path: str) -> dict:
491491
Execute git status command & return the result.
492492
"""
493493
cmd = ["git", "status", "--porcelain", "-b", "-u", "-z"]
494-
code, status, my_error = await self.__execute(cmd, cwd=path)
494+
code, status, my_error = await self.__execute(
495+
cmd, cwd=path, env=os.environ.copy()
496+
)
495497

496498
if code != 0:
497499
return {
@@ -839,7 +841,7 @@ async def branch_heads(self, path):
839841
"refs/heads/",
840842
]
841843

842-
code, output, error = await self.__execute(cmd, cwd=path)
844+
code, output, error = await self.__execute(cmd, cwd=path, env=os.environ.copy())
843845
if code != 0:
844846
return {"code": code, "command": " ".join(cmd), "message": error}
845847

@@ -905,7 +907,7 @@ async def branch_remotes(self, path):
905907
"refs/remotes/",
906908
]
907909

908-
code, output, error = await self.__execute(cmd, cwd=path)
910+
code, output, error = await self.__execute(cmd, cwd=path, env=os.environ.copy())
909911
if code != 0:
910912
return {"code": code, "command": " ".join(cmd), "message": error}
911913

0 commit comments

Comments
 (0)