Merge pull request #12453 from github/mbg/csharp/fix-env-prop

This commit is contained in:
Michael B. Gale
2023-03-09 17:55:48 +00:00
committed by GitHub

View File

@@ -199,12 +199,8 @@ namespace Semmle.Autobuild.Shared
if (workingDirectory is not null)
pi.WorkingDirectory = workingDirectory;
// Environment variables can only be used when not redirecting stdout
if (!redirectStandardOutput)
{
if (environment is not null)
environment.ForEach(kvp => pi.Environment[kvp.Key] = kvp.Value);
}
environment?.ForEach(kvp => pi.Environment[kvp.Key] = kvp.Value);
return pi;
}