overwrite existing external process environment variables to prevent throwing when a key is present that is already set (#520)

This commit is contained in:
Chris Smith
2020-11-13 11:32:25 -05:00
committed by GitHub
parent af7be8603a
commit 19854da0a1

View File

@@ -442,9 +442,8 @@ namespace k8s
{
if (configEnvironmentVariable.ContainsKey("name") && configEnvironmentVariable.ContainsKey("value"))
{
process.StartInfo.EnvironmentVariables.Add(
configEnvironmentVariable["name"],
configEnvironmentVariable["value"]);
var name = configEnvironmentVariable["name"];
process.StartInfo.EnvironmentVariables[name] = configEnvironmentVariable["value"];
}
else
{