浏览代码

git-prompt: run git status with LANG=C (#6087)

As described in #6086 there will be an error when one set another
language than English.
sheveko 6 年之前
父节点
当前提交
3cfcf5e0aa
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/git-prompt/gitstatus.py

+ 1 - 1
plugins/git-prompt/gitstatus.py

@@ -30,7 +30,7 @@ def get_tagname_or_hash():
 
 # `git status --porcelain --branch` can collect all information
 # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind
-po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE)
+po = Popen(['git', 'status', '--porcelain', '--branch'], env={"LANG": "C"}, stdout=PIPE, stderr=PIPE)
 stdout, sterr = po.communicate()
 if po.returncode != 0:
     sys.exit(0)  # Not a git repository