From 89120dc377fcf526d145770623abc0aec748d776 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 21 Feb 2013 13:53:23 +0000 Subject: [PATCH] git: only add new language env var if it doesn't exist yet. fixes #1191 --- SparkleLib/Git/SparkleGit.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SparkleLib/Git/SparkleGit.cs b/SparkleLib/Git/SparkleGit.cs index 92709c37..3ccde012 100644 --- a/SparkleLib/Git/SparkleGit.cs +++ b/SparkleLib/Git/SparkleGit.cs @@ -117,7 +117,10 @@ namespace SparkleLib.Git { StartInfo.WorkingDirectory = path; StartInfo.CreateNoWindow = true; - StartInfo.EnvironmentVariables.Add ("LANG", "en_US"); + if (StartInfo.EnvironmentVariables.ContainsKey ("LANG")) + StartInfo.EnvironmentVariables ["LANG"] = "en_US"; + else + StartInfo.EnvironmentVariables.Add ("LANG", "en_US"); if (string.IsNullOrEmpty (ExecPath)) StartInfo.Arguments = args;