From 83d8032ae831f8fdd3c75cb4b3b536c6f1e1609e Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 2 Aug 2017 10:21:14 +0200 Subject: [PATCH] (GH-1693) Fix key not used when setting process environment variable * fixes #1693 --- src/Cake.Core/Polyfill/ProcessHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Core/Polyfill/ProcessHelper.cs b/src/Cake.Core/Polyfill/ProcessHelper.cs index 299c3b0996..06006b1215 100644 --- a/src/Cake.Core/Polyfill/ProcessHelper.cs +++ b/src/Cake.Core/Polyfill/ProcessHelper.cs @@ -17,7 +17,7 @@ public static void SetEnvironmentVariable(ProcessStartInfo info, string key, str info.Environment[envKey] = value; #else var envKey = info.EnvironmentVariables.Keys.Cast().FirstOrDefault(existingKey => StringComparer.OrdinalIgnoreCase.Equals(existingKey, key)) ?? key; - info.EnvironmentVariables[key] = value; + info.EnvironmentVariables[envKey] = value; #endif } }