From fe6775d73f59d9362d664b62079871ba07884a32 Mon Sep 17 00:00:00 2001 From: Wade Ying Xing <wadexing@gmail.com> Date: Sun, 18 Sep 2022 18:08:36 +0800 Subject: [PATCH] fix(git): ensure english locale (#17849) --- lib/util/git/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index 66a9ae4554..769b0c646b 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -230,7 +230,11 @@ export async function initRepo(args: StorageConfig): Promise<void> { config.additionalBranches = []; config.branchIsModified = {}; const { localDir } = GlobalConfig.get(); - git = simpleGit(localDir, simpleGitConfig()); + git = simpleGit(localDir, simpleGitConfig()).env({ + ...process.env, + LANG: 'C', + LC_ALL: 'C', + }); gitInitialized = false; await fetchBranchCommits(); } -- GitLab