mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Downloader] Ensure consistent output from git commands (#3160)
* fix(downloader): ensure consistent output from git commands * chore(changelog): add towncrier entry
This commit is contained in:
parent
d136d594f4
commit
672050727f
1
changelog.d/downloader/3160.misc.rst
Normal file
1
changelog.d/downloader/3160.misc.rst
Normal file
@ -0,0 +1 @@
|
||||
Ensure consistent output from git commands for purpose of parsing.
|
||||
@ -513,6 +513,12 @@ class Repo(RepoJSONMixin):
|
||||
"""
|
||||
env = os.environ.copy()
|
||||
env["GIT_TERMINAL_PROMPT"] = "0"
|
||||
# attempt to force all output to plain ascii english
|
||||
# some methods that parse output may expect it
|
||||
# according to gettext manual both variables have to be set:
|
||||
# https://www.gnu.org/software/gettext/manual/gettext.html#Locale-Environment-Variables
|
||||
env["LC_ALL"] = "C"
|
||||
env["LANGUAGE"] = "C"
|
||||
kwargs["env"] = env
|
||||
async with self._repo_lock:
|
||||
p: CompletedProcess = await self._loop.run_in_executor(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user