@@ -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